changed config table
This commit is contained in:
parent
f25e90f292
commit
b06128e819
@ -2,7 +2,7 @@
|
||||
"name": "24unix/bindapi",
|
||||
"description": "manage Bind9 DNS server via REST API",
|
||||
"version": "1.0.9",
|
||||
"build_number": "361",
|
||||
"build_number": "362",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Micha Espey",
|
||||
|
41
db/migrations/20240430111136_u_u_i_d_for_config.php
Normal file
41
db/migrations/20240430111136_u_u_i_d_for_config.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Phinx\Db\Adapter\MysqlAdapter;
|
||||
|
||||
class UUIDForConfig extends Phinx\Migration\AbstractMigration
|
||||
{
|
||||
public function change()
|
||||
{
|
||||
$this->table('config', [
|
||||
'id' => false,
|
||||
'primary_key' => ['id'],
|
||||
'engine' => 'InnoDB',
|
||||
'encoding' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_general_ci',
|
||||
'comment' => '',
|
||||
'row_format' => 'DYNAMIC',
|
||||
])
|
||||
->addColumn('id', 'uuid', [
|
||||
'null' => false,
|
||||
])
|
||||
->changeColumn('name', 'string', [
|
||||
'null' => false,
|
||||
'limit' => 256,
|
||||
'collation' => 'utf8mb4_general_ci',
|
||||
'encoding' => 'utf8mb4',
|
||||
'after' => 'id',
|
||||
])
|
||||
->changeColumn('value', 'string', [
|
||||
'null' => false,
|
||||
'limit' => 256,
|
||||
'collation' => 'utf8mb4_general_ci',
|
||||
'encoding' => 'utf8mb4',
|
||||
'after' => 'name',
|
||||
])
|
||||
->addIndex(['id'], [
|
||||
'name' => 'id',
|
||||
'unique' => true,
|
||||
])
|
||||
->save();
|
||||
}
|
||||
}
|
@ -112,12 +112,36 @@ return array (
|
||||
),
|
||||
'columns' =>
|
||||
array (
|
||||
'id' =>
|
||||
array (
|
||||
'TABLE_CATALOG' => 'def',
|
||||
'TABLE_NAME' => 'config',
|
||||
'COLUMN_NAME' => 'id',
|
||||
'ORDINAL_POSITION' => 1,
|
||||
'COLUMN_DEFAULT' => NULL,
|
||||
'IS_NULLABLE' => 'NO',
|
||||
'DATA_TYPE' => 'uuid',
|
||||
'CHARACTER_MAXIMUM_LENGTH' => NULL,
|
||||
'CHARACTER_OCTET_LENGTH' => NULL,
|
||||
'NUMERIC_PRECISION' => NULL,
|
||||
'NUMERIC_SCALE' => NULL,
|
||||
'DATETIME_PRECISION' => NULL,
|
||||
'CHARACTER_SET_NAME' => NULL,
|
||||
'COLLATION_NAME' => NULL,
|
||||
'COLUMN_TYPE' => 'uuid',
|
||||
'COLUMN_KEY' => 'PRI',
|
||||
'EXTRA' => '',
|
||||
'PRIVILEGES' => 'select,insert,update,references',
|
||||
'COLUMN_COMMENT' => '',
|
||||
'IS_GENERATED' => 'NEVER',
|
||||
'GENERATION_EXPRESSION' => NULL,
|
||||
),
|
||||
'name' =>
|
||||
array (
|
||||
'TABLE_CATALOG' => 'def',
|
||||
'TABLE_NAME' => 'config',
|
||||
'COLUMN_NAME' => 'name',
|
||||
'ORDINAL_POSITION' => 1,
|
||||
'ORDINAL_POSITION' => 2,
|
||||
'COLUMN_DEFAULT' => NULL,
|
||||
'IS_NULLABLE' => 'NO',
|
||||
'DATA_TYPE' => 'varchar',
|
||||
@ -129,7 +153,7 @@ return array (
|
||||
'CHARACTER_SET_NAME' => 'utf8mb4',
|
||||
'COLLATION_NAME' => 'utf8mb4_general_ci',
|
||||
'COLUMN_TYPE' => 'varchar(256)',
|
||||
'COLUMN_KEY' => 'PRI',
|
||||
'COLUMN_KEY' => 'UNI',
|
||||
'EXTRA' => '',
|
||||
'PRIVILEGES' => 'select,insert,update,references',
|
||||
'COLUMN_COMMENT' => '',
|
||||
@ -141,7 +165,7 @@ return array (
|
||||
'TABLE_CATALOG' => 'def',
|
||||
'TABLE_NAME' => 'config',
|
||||
'COLUMN_NAME' => 'value',
|
||||
'ORDINAL_POSITION' => 2,
|
||||
'ORDINAL_POSITION' => 3,
|
||||
'COLUMN_DEFAULT' => NULL,
|
||||
'IS_NULLABLE' => 'NO',
|
||||
'DATA_TYPE' => 'varchar',
|
||||
@ -163,6 +187,24 @@ return array (
|
||||
),
|
||||
'indexes' =>
|
||||
array (
|
||||
'PRIMARY' =>
|
||||
array (
|
||||
1 =>
|
||||
array (
|
||||
'Table' => 'config',
|
||||
'Non_unique' => 0,
|
||||
'Key_name' => 'PRIMARY',
|
||||
'Seq_in_index' => 1,
|
||||
'Column_name' => 'id',
|
||||
'Collation' => 'A',
|
||||
'Sub_part' => NULL,
|
||||
'Packed' => NULL,
|
||||
'Null' => '',
|
||||
'Index_type' => 'BTREE',
|
||||
'Comment' => '',
|
||||
'Index_comment' => '',
|
||||
),
|
||||
),
|
||||
'name' =>
|
||||
array (
|
||||
1 =>
|
||||
@ -181,6 +223,24 @@ return array (
|
||||
'Index_comment' => '',
|
||||
),
|
||||
),
|
||||
'id' =>
|
||||
array (
|
||||
1 =>
|
||||
array (
|
||||
'Table' => 'config',
|
||||
'Non_unique' => 0,
|
||||
'Key_name' => 'id',
|
||||
'Seq_in_index' => 1,
|
||||
'Column_name' => 'id',
|
||||
'Collation' => 'A',
|
||||
'Sub_part' => NULL,
|
||||
'Packed' => NULL,
|
||||
'Null' => '',
|
||||
'Index_type' => 'BTREE',
|
||||
'Comment' => '',
|
||||
'Index_comment' => '',
|
||||
),
|
||||
),
|
||||
),
|
||||
'foreign_keys' => NULL,
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user