fix:修复表索引 unique 设置失败的问题

This commit is contained in:
妙码生花 2023-07-12 19:01:33 +08:00
parent 5ee0ba3a5e
commit 13ab01422e

View File

@ -58,7 +58,6 @@ class Install extends Migrator
->addColumn('updatetime', 'integer', ['limit' => 10, 'signed' => false, 'null' => true, 'default' => null, 'comment' => '创建时间']) ->addColumn('updatetime', 'integer', ['limit' => 10, 'signed' => false, 'null' => true, 'default' => null, 'comment' => '创建时间'])
->addIndex(['username'], [ ->addIndex(['username'], [
'unique' => true, 'unique' => true,
'type' => 'BTREE',
]) ])
->create(); ->create();
} }
@ -230,7 +229,6 @@ class Install extends Migrator
->addColumn('weigh', 'integer', ['comment' => '权重', 'default' => 0]) ->addColumn('weigh', 'integer', ['comment' => '权重', 'default' => 0])
->addIndex(['name'], [ ->addIndex(['name'], [
'unique' => true, 'unique' => true,
'type' => 'BTREE',
]) ])
->create(); ->create();
} }
@ -448,15 +446,12 @@ class Install extends Migrator
->addColumn('createtime', 'biginteger', ['signed' => false, 'null' => true, 'default' => null, 'comment' => '创建时间']) ->addColumn('createtime', 'biginteger', ['signed' => false, 'null' => true, 'default' => null, 'comment' => '创建时间'])
->addIndex(['username'], [ ->addIndex(['username'], [
'unique' => true, 'unique' => true,
'type' => 'BTREE',
]) ])
->addIndex(['email'], [ ->addIndex(['email'], [
'unique' => true, 'unique' => true,
'type' => 'BTREE',
]) ])
->addIndex(['mobile'], [ ->addIndex(['mobile'], [
'unique' => true, 'unique' => true,
'type' => 'BTREE',
]) ])
->create(); ->create();
} }