Skip to content

Commit 4a11785

Browse files
committed
Fix failing tests
1 parent f998279 commit 4a11785

File tree

29 files changed

+46
-46
lines changed

29 files changed

+46
-46
lines changed

src/generator/default/dbmodel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
*/
5050
abstract class <?= $model->getClassName() ?> extends \yii\db\ActiveRecord
5151
{
52-
<?php if($scenarios = $model->getScenarios()):
53-
foreach($scenarios as $scenario): ?>
52+
<?php if ($scenarios = $model->getScenarios()):
53+
foreach ($scenarios as $scenario): ?>
5454
/**
5555
*<?= $scenario['description'] ?>
5656

@@ -76,7 +76,7 @@ public static function tableName()
7676
{
7777
return <?= var_export($model->getTableAlias()) ?>;
7878
}
79-
<?php if($scenarios): ?>
79+
<?php if ($scenarios): ?>
8080

8181
/**
8282
* Automatically generated scenarios from the model 'x-scenarios'.
@@ -92,7 +92,7 @@ public function scenarios()
9292
$default = parent::scenarios()[self::SCENARIO_DEFAULT];
9393

9494
return [
95-
<?php foreach($scenarios as $scenario): ?>
95+
<?php foreach ($scenarios as $scenario): ?>
9696
self::<?= $scenario['const'] ?> => $default,
9797
<?php endforeach; ?>
9898
/**

tests/specs/blog/migrations/m200000_000002_create_table_blog_posts.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ public function up()
1111
0 => 'uid varchar(128) NOT NULL',
1212
'title' => $this->string(255)->notNull(),
1313
'slug' => $this->string(200)->null()->defaultValue(null),
14-
'category_id' => $this->integer()->notNull(),
14+
'category_id' => $this->integer()->notNull()->comment('Category of posts'),
1515
'active' => $this->boolean()->notNull()->defaultValue(false),
1616
'created_at' => $this->date()->null()->defaultValue(null),
17-
'created_by_id' => $this->integer()->null()->defaultValue(null),
17+
'created_by_id' => $this->integer()->null()->defaultValue(null)->comment('The User'),
1818
]);
1919
$this->addPrimaryKey('pk_blog_posts_uid', '{{%blog_posts}}', 'uid');
2020
$this->createIndex('blog_posts_title_key', '{{%blog_posts}}', 'title', true);

tests/specs/blog/migrations/m200000_000004_create_table_post_comments.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ public function up()
99
{
1010
$this->createTable('{{%post_comments}}', [
1111
'id' => $this->bigPrimaryKey(),
12-
'post_id' => $this->string(128)->notNull(),
13-
'author_id' => $this->integer()->notNull(),
12+
'post_id' => $this->string(128)->notNull()->comment('A blog post (uid used as pk for test purposes)'),
13+
'author_id' => $this->integer()->notNull()->comment('The User'),
1414
0 => 'message json NOT NULL',
1515
1 => 'meta_data json NOT NULL',
1616
'created_at' => $this->integer()->notNull(),

tests/specs/blog/migrations_maria_db/m200000_000002_create_table_blog_posts.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ public function up()
1111
0 => 'uid varchar(128) NOT NULL',
1212
'title' => $this->string(255)->notNull(),
1313
'slug' => $this->string(200)->null()->defaultValue(null),
14-
'category_id' => $this->integer()->notNull(),
14+
'category_id' => $this->integer()->notNull()->comment('Category of posts'),
1515
'active' => $this->boolean()->notNull()->defaultValue(false),
1616
'created_at' => $this->date()->null()->defaultValue(null),
17-
'created_by_id' => $this->integer()->null()->defaultValue(null),
17+
'created_by_id' => $this->integer()->null()->defaultValue(null)->comment('The User'),
1818
]);
1919
$this->addPrimaryKey('pk_blog_posts_uid', '{{%blog_posts}}', 'uid');
2020
$this->createIndex('blog_posts_title_key', '{{%blog_posts}}', 'title', true);

tests/specs/blog/migrations_maria_db/m200000_000004_create_table_post_comments.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ public function up()
99
{
1010
$this->createTable('{{%post_comments}}', [
1111
'id' => $this->bigPrimaryKey(),
12-
'post_id' => $this->string(128)->notNull(),
13-
'author_id' => $this->integer()->notNull(),
12+
'post_id' => $this->string(128)->notNull()->comment('A blog post (uid used as pk for test purposes)'),
13+
'author_id' => $this->integer()->notNull()->comment('The User'),
1414
0 => 'message json NOT NULL DEFAULT \'[]\'',
1515
1 => 'meta_data json NOT NULL DEFAULT \'[]\'',
1616
'created_at' => $this->integer()->notNull(),

tests/specs/blog/migrations_mysql_db/m200000_000002_create_table_blog_posts.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ public function up()
1111
0 => 'uid varchar(128) NOT NULL',
1212
'title' => $this->string(255)->notNull(),
1313
'slug' => $this->string(200)->null()->defaultValue(null),
14-
'category_id' => $this->integer()->notNull(),
14+
'category_id' => $this->integer()->notNull()->comment('Category of posts'),
1515
'active' => $this->boolean()->notNull()->defaultValue(false),
1616
'created_at' => $this->date()->null()->defaultValue(null),
17-
'created_by_id' => $this->integer()->null()->defaultValue(null),
17+
'created_by_id' => $this->integer()->null()->defaultValue(null)->comment('The User'),
1818
]);
1919
$this->addPrimaryKey('pk_blog_posts_uid', '{{%blog_posts}}', 'uid');
2020
$this->createIndex('blog_posts_title_key', '{{%blog_posts}}', 'title', true);

tests/specs/blog/migrations_mysql_db/m200000_000004_create_table_post_comments.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ public function up()
99
{
1010
$this->createTable('{{%post_comments}}', [
1111
'id' => $this->bigPrimaryKey(),
12-
'post_id' => $this->string(128)->notNull(),
13-
'author_id' => $this->integer()->notNull(),
12+
'post_id' => $this->string(128)->notNull()->comment('A blog post (uid used as pk for test purposes)'),
13+
'author_id' => $this->integer()->notNull()->comment('The User'),
1414
0 => 'message json NOT NULL',
1515
1 => 'meta_data json NOT NULL',
1616
'created_at' => $this->integer()->notNull(),

tests/specs/blog/migrations_pgsql_db/m200000_000002_create_table_blog_posts.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ public function safeUp()
1111
0 => '"uid" varchar(128) NOT NULL',
1212
'title' => $this->string(255)->notNull(),
1313
'slug' => $this->string(200)->null()->defaultValue(null),
14-
'category_id' => $this->integer()->notNull(),
14+
'category_id' => $this->integer()->notNull()->comment('Category of posts'),
1515
'active' => $this->boolean()->notNull()->defaultValue(false),
1616
'created_at' => $this->date()->null()->defaultValue(null),
17-
'created_by_id' => $this->integer()->null()->defaultValue(null),
17+
'created_by_id' => $this->integer()->null()->defaultValue(null)->comment('The User'),
1818
]);
1919
$this->addPrimaryKey('pk_blog_posts_uid', '{{%blog_posts}}', 'uid');
2020
$this->createIndex('blog_posts_title_key', '{{%blog_posts}}', 'title', true);

tests/specs/blog/migrations_pgsql_db/m200000_000004_create_table_post_comments.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ public function safeUp()
99
{
1010
$this->createTable('{{%post_comments}}', [
1111
'id' => $this->bigPrimaryKey(),
12-
'post_id' => $this->string(128)->notNull(),
13-
'author_id' => $this->integer()->notNull(),
12+
'post_id' => $this->string(128)->notNull()->comment('A blog post (uid used as pk for test purposes)'),
13+
'author_id' => $this->integer()->notNull()->comment('The User'),
1414
0 => '"message" json NOT NULL DEFAULT \'[]\'',
1515
1 => '"meta_data" json NOT NULL DEFAULT \'[]\'',
1616
'created_at' => $this->integer()->notNull(),

tests/specs/blog_v2/migrations_maria_db/m200000_000005_change_table_v2_comments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public function up()
99
{
1010
$this->dropForeignKey('fk_v2_comments_post_id_v2_posts_uid', '{{%v2_comments}}');
1111
$this->dropForeignKey('fk_v2_comments_author_id_v2_users_id', '{{%v2_comments}}');
12-
$this->addColumn('{{%v2_comments}}', 'user_id', $this->bigInteger()->null()->defaultValue(null)->after('post_id'));
12+
$this->addColumn('{{%v2_comments}}', 'user_id', $this->bigInteger()->null()->defaultValue(null)->after('post_id')->comment('The User'));
1313
$this->dropColumn('{{%v2_comments}}', 'author_id');
1414
$this->alterColumn('{{%v2_comments}}', 'message', $this->text()->notNull());
1515
$this->alterColumn('{{%v2_comments}}', 'meta_data', $this->string(300)->null()->defaultValue(''));

tests/specs/blog_v2/migrations_mysql_db/m200000_000005_change_table_v2_comments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public function up()
99
{
1010
$this->dropForeignKey('fk_v2_comments_post_id_v2_posts_uid', '{{%v2_comments}}');
1111
$this->dropForeignKey('fk_v2_comments_author_id_v2_users_id', '{{%v2_comments}}');
12-
$this->addColumn('{{%v2_comments}}', 'user_id', $this->bigInteger()->null()->defaultValue(null)->after('post_id'));
12+
$this->addColumn('{{%v2_comments}}', 'user_id', $this->bigInteger()->null()->defaultValue(null)->after('post_id')->comment('The User'));
1313
$this->dropColumn('{{%v2_comments}}', 'author_id');
1414
$this->alterColumn('{{%v2_comments}}', 'message', $this->text()->notNull());
1515
$this->alterColumn('{{%v2_comments}}', 'meta_data', $this->string(300)->null()->defaultValue(''));

tests/specs/blog_v2/migrations_pgsql_db/m200000_000005_change_table_v2_comments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public function safeUp()
99
{
1010
$this->dropForeignKey('fk_v2_comments_author_id_v2_users_id', '{{%v2_comments}}');
1111
$this->dropForeignKey('fk_v2_comments_post_id_v2_posts_uid', '{{%v2_comments}}');
12-
$this->addColumn('{{%v2_comments}}', 'user_id', $this->bigInteger()->null()->defaultValue(null));
12+
$this->addColumn('{{%v2_comments}}', 'user_id', $this->bigInteger()->null()->defaultValue(null)->comment('The User'));
1313
$this->dropColumn('{{%v2_comments}}', 'author_id');
1414
$this->alterColumn('{{%v2_comments}}', 'message', 'text NOT NULL USING "message"::text');
1515
$this->alterColumn('{{%v2_comments}}', 'message', "DROP DEFAULT");

tests/specs/fk_col_name/app/migrations_mysql_db/m200000_000002_create_table_webhooks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public function up()
1010
$this->createTable('{{%webhooks}}', [
1111
'id' => $this->primaryKey(),
1212
'name' => $this->text()->null(),
13-
'user_id' => $this->integer()->null()->defaultValue(null),
13+
'user_id' => $this->integer()->null()->defaultValue(null)->comment('Test model for model code generation that should not contain id column in rules'),
1414
'redelivery_of' => $this->integer()->null()->defaultValue(null),
1515
]);
1616
$this->addForeignKey('fk_webhooks_user_id_users_id', '{{%webhooks}}', 'user_id', '{{%users}}', 'id');

tests/specs/fk_col_name_index/app/migrations_mysql_db/m200000_000002_create_table_webhooks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public function up()
1010
$this->createTable('{{%webhooks}}', [
1111
'id' => $this->primaryKey(),
1212
'name' => $this->string(255)->null()->defaultValue(null),
13-
'user_id' => $this->integer()->null()->defaultValue(null),
13+
'user_id' => $this->integer()->null()->defaultValue(null)->comment('Test model for model code generation that should not contain id column in rules'),
1414
'redelivery_of' => $this->integer()->null()->defaultValue(null),
1515
'rd_abc_2' => $this->integer()->null()->defaultValue(null),
1616
]);

tests/specs/issue_fix/175_bug_allof_with_multiple_dollarrefs/pgsql/migrations_pgsql_db/m200000_000000_create_table_accounts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public function up()
99
{
1010
$this->createTable('{{%accounts}}', [
1111
'id' => $this->primaryKey(),
12-
'name' => $this->string(128)->notNull(),
12+
'name' => $this->string(128)->notNull()->comment('account name'),
1313
'paymentMethodName' => $this->text()->null(),
1414
]);
1515
}

tests/specs/issue_fix/175_bug_allof_with_multiple_dollarrefs/pgsql/migrations_pgsql_db/m200000_000001_create_table_contacts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public function up()
99
{
1010
$this->createTable('{{%contacts}}', [
1111
'id' => $this->primaryKey(),
12-
'account_id' => $this->integer()->notNull(),
12+
'account_id' => $this->integer()->notNull()->comment('Account'),
1313
'active' => $this->boolean()->null()->defaultValue(false),
1414
'nickname' => $this->text()->null(),
1515
]);

tests/specs/relations_in_faker/app/migrations_pgsql_db/m200000_000001_create_table_b123s.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public function safeUp()
1010
$this->createTable('{{%b123s}}', [
1111
'id' => $this->primaryKey(),
1212
'name' => $this->text()->null()->defaultValue(null),
13-
'c123_id' => $this->integer()->null()->defaultValue(null),
13+
'c123_id' => $this->integer()->null()->defaultValue(null)->comment('desc'),
1414
]);
1515
$this->addForeignKey('fk_b123s_c123_id_c123s_id', '{{%b123s}}', 'c123_id', '{{%c123s}}', 'id');
1616
}

tests/specs/relations_in_faker/app/migrations_pgsql_db/m200000_000002_create_table_a123s.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public function safeUp()
1010
$this->createTable('{{%a123s}}', [
1111
'id' => $this->primaryKey(),
1212
'name' => $this->text()->null()->defaultValue(null),
13-
'b123_id' => $this->integer()->null()->defaultValue(null),
13+
'b123_id' => $this->integer()->null()->defaultValue(null)->comment('desc'),
1414
]);
1515
$this->addForeignKey('fk_a123s_b123_id_b123s_id', '{{%a123s}}', 'b123_id', '{{%b123s}}', 'id');
1616
}

tests/specs/relations_in_faker/app/migrations_pgsql_db/m200000_000003_create_table_accounts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public function safeUp()
99
{
1010
$this->createTable('{{%accounts}}', [
1111
'id' => $this->primaryKey(),
12-
'name' => $this->string(40)->notNull(),
12+
'name' => $this->string(40)->notNull()->comment('account name'),
1313
]);
1414
}
1515

tests/specs/relations_in_faker/app/migrations_pgsql_db/m200000_000005_create_table_domains.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ public function safeUp()
99
{
1010
$this->createTable('{{%domains}}', [
1111
'id' => $this->primaryKey(),
12-
'name' => $this->string(128)->notNull(),
13-
'account_id' => $this->integer()->notNull(),
12+
'name' => $this->string(128)->notNull()->comment('domain or sub-domain name, in DNS syntax, IDN are converted'),
13+
'account_id' => $this->integer()->notNull()->comment('user account'),
1414
0 => '"created_at" timestamp NOT NULL',
1515
]);
1616
$this->addForeignKey('fk_domains_account_id_accounts_id', '{{%domains}}', 'account_id', '{{%accounts}}', 'id');

tests/specs/relations_in_faker/app/migrations_pgsql_db/m200000_000006_create_table_e123s.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public function safeUp()
1010
$this->createTable('{{%e123s}}', [
1111
'id' => $this->primaryKey(),
1212
'name' => $this->text()->null()->defaultValue(null),
13-
'b123_id' => $this->integer()->null()->defaultValue(null),
13+
'b123_id' => $this->integer()->null()->defaultValue(null)->comment('desc'),
1414
]);
1515
$this->addForeignKey('fk_e123s_b123_id_b123s_id', '{{%e123s}}', 'b123_id', '{{%b123s}}', 'id');
1616
}

tests/specs/relations_in_faker/app/migrations_pgsql_db/m200000_000007_create_table_routings.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ public function safeUp()
99
{
1010
$this->createTable('{{%routings}}', [
1111
'id' => $this->primaryKey(),
12-
'domain_id' => $this->integer()->notNull(),
12+
'domain_id' => $this->integer()->notNull()->comment('domain'),
1313
'path' => $this->string(255)->null()->defaultValue(null),
1414
'ssl' => $this->boolean()->null()->defaultValue(null),
1515
'redirect_to_ssl' => $this->boolean()->null()->defaultValue(null),
1616
'service' => $this->string(255)->null()->defaultValue(null),
1717
0 => '"created_at" timestamp NULL DEFAULT NULL',
18-
'd123_id' => $this->integer()->null()->defaultValue(null),
19-
'a123_id' => $this->integer()->null()->defaultValue(null),
18+
'd123_id' => $this->integer()->null()->defaultValue(null)->comment('desc'),
19+
'a123_id' => $this->integer()->null()->defaultValue(null)->comment('desc'),
2020
]);
2121
$this->addForeignKey('fk_routings_domain_id_domains_id', '{{%routings}}', 'domain_id', '{{%domains}}', 'id');
2222
$this->addForeignKey('fk_routings_d123_id_d123s_id', '{{%routings}}', 'd123_id', '{{%d123s}}', 'id');

tests/specs/x_db_type/edit_column/maria/app/migrations_maria_db/m200000_000003_create_table_pristines.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function up()
1919
7 => 'col_9 varchar(9) NULL DEFAULT NULL',
2020
8 => 'col_10 varchar(10) NULL DEFAULT NULL',
2121
9 => 'col_11 text NULL DEFAULT NULL',
22-
10 => 'price decimal(10,2) NULL DEFAULT 0',
22+
10 => 'price decimal(10,2) NULL DEFAULT 0 COMMENT \'price in EUR\'',
2323
]);
2424
}
2525

tests/specs/x_db_type/edit_column/mysql/app/migrations_mysql_db/m200000_000003_create_table_pristines.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function up()
1919
7 => 'col_9 varchar(9) NULL DEFAULT NULL',
2020
8 => 'col_10 varchar(10) NULL DEFAULT NULL',
2121
9 => 'col_11 text NULL',
22-
10 => 'price decimal(10,2) NULL DEFAULT 0',
22+
10 => 'price decimal(10,2) NULL DEFAULT 0 COMMENT \'price in EUR\'',
2323
]);
2424
}
2525

tests/specs/x_db_type/fresh/maria/app/migrations_maria_db/m200000_000003_create_table_pristines.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function up()
1919
7 => 'col_9 varchar(9) NULL DEFAULT NULL',
2020
8 => 'col_10 varchar(10) NULL DEFAULT NULL',
2121
9 => 'col_11 text NULL DEFAULT NULL',
22-
10 => 'price decimal(10,2) NULL DEFAULT 0',
22+
10 => 'price decimal(10,2) NULL DEFAULT 0 COMMENT \'price in EUR\'',
2323
]);
2424
}
2525

tests/specs/x_db_type/fresh/mysql/app/migrations_mysql_db/m200000_000003_create_table_pristines.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function up()
1919
7 => 'col_9 varchar(9) NULL DEFAULT NULL',
2020
8 => 'col_10 varchar(10) NULL DEFAULT NULL',
2121
9 => 'col_11 text NULL',
22-
10 => 'price decimal(10,2) NULL DEFAULT 0',
22+
10 => 'price decimal(10,2) NULL DEFAULT 0 COMMENT \'price in EUR\'',
2323
]);
2424
}
2525

tests/specs/x_db_type/new_column/maria/app/migrations_maria_db/m200000_000003_create_table_pristines.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function up()
1919
7 => 'col_9 varchar(9) NULL DEFAULT NULL',
2020
8 => 'col_10 varchar(10) NULL DEFAULT NULL',
2121
9 => 'col_11 text NULL DEFAULT NULL',
22-
10 => 'price decimal(10,2) NULL DEFAULT 0',
22+
10 => 'price decimal(10,2) NULL DEFAULT 0 COMMENT \'price in EUR\'',
2323
]);
2424
}
2525

tests/specs/x_db_type/new_column/mysql/app/migrations_mysql_db/m200000_000003_create_table_pristines.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function up()
1919
7 => 'col_9 varchar(9) NULL DEFAULT NULL',
2020
8 => 'col_10 varchar(10) NULL DEFAULT NULL',
2121
9 => 'col_11 text NULL',
22-
10 => 'price decimal(10,2) NULL DEFAULT 0',
22+
10 => 'price decimal(10,2) NULL DEFAULT 0 COMMENT \'price in EUR\'',
2323
]);
2424
}
2525

tests/specs/x_on_x_fk_constraint/app/migrations_pgsql_db/m200000_000001_create_table_postxes.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ public function safeUp()
1010
$this->createTable('{{%postxes}}', [
1111
'id' => $this->primaryKey(),
1212
'title' => $this->text()->null()->defaultValue(null),
13-
'user_id' => $this->integer()->null()->defaultValue(null),
14-
'user_2_id' => $this->integer()->null()->defaultValue(null),
15-
'user_3_id' => $this->integer()->null()->defaultValue(null),
16-
'user_4_id' => $this->integer()->null()->defaultValue(null),
13+
'user_id' => $this->integer()->null()->defaultValue(null)->comment('x on-x (update|delete) foreign key constraint'),
14+
'user_2_id' => $this->integer()->null()->defaultValue(null)->comment('x on-x (update|delete) foreign key constraint'),
15+
'user_3_id' => $this->integer()->null()->defaultValue(null)->comment('x on-x (update|delete) foreign key constraint'),
16+
'user_4_id' => $this->integer()->null()->defaultValue(null)->comment('x on-x (update|delete) foreign key constraint'),
1717
]);
1818
$this->addForeignKey('fk_postxes_user_id_userxes_id', '{{%postxes}}', 'user_id', '{{%userxes}}', 'id', null, 'CASCADE');
1919
$this->addForeignKey('fk_postxes_user_2_id_userxes_id', '{{%postxes}}', 'user_2_id', '{{%userxes}}', 'id', 'SET NULL', 'CASCADE');

0 commit comments

Comments
 (0)