@@ -225,7 +225,6 @@ public function testCreateTable(): void
225225 $ db = $ this ->getConnection ();
226226
227227 $ command = $ db ->createCommand ();
228- $ mb = $ db ->getMigrationBuilder ();
229228
230229 $ expected = <<<SQL
231230 CREATE TABLE [test_table] (
@@ -240,14 +239,14 @@ public function testCreateTable(): void
240239 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB
241240 SQL ;
242241 $ columns = [
243- 'id ' => $ mb -> primaryKey ( 5 ) ,
244- 'name ' => $ mb -> string (255 )-> notNull () ,
245- 'email ' => $ mb -> string (255 )-> notNull () ,
246- 'address ' => $ mb -> string (255 )-> notNull () ,
247- 'status ' => $ mb -> integer ()-> notNull () ,
248- 'profile_id ' => $ mb -> integer ()-> notNull () ,
249- 'created_at ' => $ mb -> timestamp ()-> notNull () ,
250- 'updated_at ' => $ mb -> timestamp ()-> notNull () ,
242+ 'id ' => SchemaInterface:: TYPE_PK ,
243+ 'name ' => SchemaInterface:: TYPE_STRING . ' (255) NOT NULL ' ,
244+ 'email ' => SchemaInterface:: TYPE_STRING . ' (255) NOT NULL ' ,
245+ 'address ' => SchemaInterface:: TYPE_STRING . ' (255) NOT NULL ' ,
246+ 'status ' => SchemaInterface:: TYPE_INTEGER . ' NOT NULL ' ,
247+ 'profile_id ' => SchemaInterface:: TYPE_INTEGER . ' NOT NULL ' ,
248+ 'created_at ' => SchemaInterface:: TYPE_TIMESTAMP . ' NOT NULL ' ,
249+ 'updated_at ' => SchemaInterface:: TYPE_TIMESTAMP . ' NOT NULL ' ,
251250 ];
252251 $ options = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB ' ;
253252 $ sql = $ command ->createTable ('test_table ' , $ columns , $ options )->getSql ();
0 commit comments