diff --git a/composer.json b/composer.json index 5efc416..3b0de7f 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "24unix/bindapi", "description": "manage Bind9 DNS server via REST API", "version": "1.0.9", - "build_number": "363", + "build_number": "364", "authors": [ { "name": "Micha Espey", diff --git a/db/migrations/20240430112049_default_u_u_i_dfor_config.php b/db/migrations/20240430112049_default_u_u_i_dfor_config.php new file mode 100644 index 0000000..f0d34fa --- /dev/null +++ b/db/migrations/20240430112049_default_u_u_i_dfor_config.php @@ -0,0 +1,24 @@ +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(); + } +} diff --git a/db/migrations/schema.php b/db/migrations/schema.php index 621c26f..46ea71e 100644 --- a/db/migrations/schema.php +++ b/db/migrations/schema.php @@ -118,7 +118,7 @@ return array ( 'TABLE_NAME' => 'config', 'COLUMN_NAME' => 'id', 'ORDINAL_POSITION' => 1, - 'COLUMN_DEFAULT' => NULL, + 'COLUMN_DEFAULT' => 'uuid()', 'IS_NULLABLE' => 'NO', 'DATA_TYPE' => 'uuid', 'CHARACTER_MAXIMUM_LENGTH' => NULL,