mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-07 02:22:48 +08:00
修复seeder错误;删除第三方的think迁移工具,在extend中重新实现;
This commit is contained in:
41
extend/phinx/Config/FeatureFlags.php
Normal file
41
extend/phinx/Config/FeatureFlags.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* MIT License
|
||||
* For full license information, please view the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Phinx\Config;
|
||||
|
||||
/**
|
||||
* Class to hold features flags to toggle breaking changes in Phinx.
|
||||
*
|
||||
* New flags should be added very sparingly.
|
||||
*/
|
||||
class FeatureFlags
|
||||
{
|
||||
/**
|
||||
* @var bool Should Phinx create unsigned primary keys by default?
|
||||
*/
|
||||
public static $unsignedPrimaryKeys = true;
|
||||
/**
|
||||
* @var bool Should Phinx create columns NULL by default?
|
||||
*/
|
||||
public static $columnNullDefault = true;
|
||||
|
||||
/**
|
||||
* Set the feature flags from the `feature_flags` section of the overall
|
||||
* config.
|
||||
*
|
||||
* @param array $config The `feature_flags` section of the config
|
||||
*/
|
||||
public static function setFlagsFromConfig(array $config): void
|
||||
{
|
||||
if (isset($config['unsigned_primary_keys'])) {
|
||||
self::$unsignedPrimaryKeys = (bool)$config['unsigned_primary_keys'];
|
||||
}
|
||||
if (isset($config['column_null_default'])) {
|
||||
self::$columnNullDefault = (bool)$config['column_null_default'];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user