changed config table

This commit is contained in:
tracer 2024-04-30 13:21:01 +02:00
parent 0f13e29fe9
commit c6ece08a0b
3 changed files with 26 additions and 2 deletions

View File

@ -2,7 +2,7 @@
"name": "24unix/bindapi", "name": "24unix/bindapi",
"description": "manage Bind9 DNS server via REST API", "description": "manage Bind9 DNS server via REST API",
"version": "1.0.9", "version": "1.0.9",
"build_number": "363", "build_number": "364",
"authors": [ "authors": [
{ {
"name": "Micha Espey", "name": "Micha Espey",

View File

@ -0,0 +1,24 @@
<?php
use Phinx\Db\Adapter\MysqlAdapter;
class DefaultUUIDforConfig 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',
])
->changeColumn('id', 'uuid', [
'null' => false,
'default' => 'uuid()',
])
->save();
}
}

View File

@ -118,7 +118,7 @@ return array (
'TABLE_NAME' => 'config', 'TABLE_NAME' => 'config',
'COLUMN_NAME' => 'id', 'COLUMN_NAME' => 'id',
'ORDINAL_POSITION' => 1, 'ORDINAL_POSITION' => 1,
'COLUMN_DEFAULT' => NULL, 'COLUMN_DEFAULT' => 'uuid()',
'IS_NULLABLE' => 'NO', 'IS_NULLABLE' => 'NO',
'DATA_TYPE' => 'uuid', 'DATA_TYPE' => 'uuid',
'CHARACTER_MAXIMUM_LENGTH' => NULL, 'CHARACTER_MAXIMUM_LENGTH' => NULL,