Skip to content

Commit

Permalink
fixed boolean default value #1108
Browse files Browse the repository at this point in the history
  • Loading branch information
nadar committed Dec 20, 2016
1 parent ca3d4e2 commit 687fd23
Show file tree
Hide file tree
Showing 19 changed files with 35 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public function safeUp()
'city' => $this->string(80),
'country' => $this->string(80),
'company' => $this->string(80),
'subscription_newsletter' => $this->boolean()->defaultValue(0),
'subscription_medianews' => $this->boolean()->defaultValue(0),
'subscription_newsletter' => $this->boolean()->defaultValue(false),
'subscription_medianews' => $this->boolean()->defaultValue(false),
'verification_hash' => $this->string(80),
'is_mail_verified' => $this->boolean()->defaultValue(0),
'is_active' => $this->boolean()->defaultValue(0),
'is_mail_verified' => $this->boolean()->defaultValue(false),
'is_active' => $this->boolean()->defaultValue(false),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function safeUp()
'id' => 'pk',
'name' => $this->string(255)->notNull(),
'text' => $this->text(),
'is_deleted' => $this->boolean()->defaultValue(0),
'is_deleted' => $this->boolean()->defaultValue(false),
]);
}

Expand Down
4 changes: 2 additions & 2 deletions modules/admin/src/migrations/m141104_114809_admin_user.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public function safeUp()
'password' => $this->string(255),
'password_salt' => $this->string(255),
'auth_token' => $this->string(255),
'is_deleted' => $this->boolean()->defaultValue(0),
'is_deleted' => $this->boolean()->defaultValue(false),
'secure_token' => $this->string(40),
'secure_token_timestamp' => $this->integer(11)->defaultValue(0),
'force_reload' => $this->boolean()->defaultValue(0),
'force_reload' => $this->boolean()->defaultValue(false),
'settings' => $this->text(),
]);
}
Expand Down
2 changes: 1 addition & 1 deletion modules/admin/src/migrations/m141203_121042_admin_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function safeUp()
'id' => $this->primaryKey(),
'name' => $this->string(255),
'short_code' => $this->string(15),
'is_default' => $this->boolean()->defaultValue(0),
'is_default' => $this->boolean()->defaultValue(false),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function safeUp()
'name' => $this->string(255),
'parent_id' => $this->integer(11),
'timestamp_create' => $this->integer(11),
'is_deleted' => $this->boolean()->defaultValue(0),
'is_deleted' => $this->boolean()->defaultValue(false),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public function safeUp()
{
$this->createTable('admin_storage_file', [
'id' => $this->primaryKey(),
'is_hidden' => $this->boolean()->defaultValue(0),
'is_hidden' => $this->boolean()->defaultValue(false),
'folder_id' => $this->integer(11)->defaultValue(0),
'name_original' => $this->string(255),
'name_new' => $this->string(255),
Expand All @@ -21,8 +21,8 @@ public function safeUp()
'upload_timestamp' => $this->integer(11),
'file_size' => $this->integer(11)->defaultValue(0), // in bytes
'upload_user_id' => $this->integer(11)->defaultValue(0),
'is_deleted' => $this->boolean()->defaultValue(0),
'passthrough_file' => $this->boolean()->defaultValue(0),
'is_deleted' => $this->boolean()->defaultValue(false),
'passthrough_file' => $this->boolean()->defaultValue(false),
'passthrough_file_password' => $this->string(40),
'passthrough_file_stats' => $this->integer(11)->defaultValue(0),
'caption' => $this->text(),
Expand Down
2 changes: 1 addition & 1 deletion modules/admin/src/migrations/m150323_125407_admin_auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function up()
'id' => $this->primaryKey(),
'alias_name' => $this->string(60)->notNull(),
'module_name' => $this->string(60)->notNull(),
'is_crud' => $this->boolean()->defaultValue(0),
'is_crud' => $this->boolean()->defaultValue(false),
'route' => $this->string(200),
'api' => $this->string(200),
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public function safeUp()
'timestamp_create' => $this->integer(11)->notNull(),
'route' => $this->string(80)->notNull(),
'api' => $this->string(80)->notNull(),
'is_update' => $this->boolean()->defaultValue(0),
'is_insert' => $this->boolean()->defaultValue(0),
'is_update' => $this->boolean()->defaultValue(false),
'is_insert' => $this->boolean()->defaultValue(false),
'attributes_json' => $this->text()->notNull(),
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class m161219_150240_admin_lang_soft_delete extends Migration
{
public function safeUp()
{
$this->addColumn('admin_lang', 'is_deleted', $this->boolean()->defaultValue(0));
$this->addColumn('admin_lang', 'is_deleted', $this->boolean()->defaultValue(false));
}

public function safeDown()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function safeUp()
'id' => $this->primaryKey(),
'name' => $this->string(180)->notNull(),
'alias' => $this->string(180)->notNull(),
'is_deleted' => $this->boolean()->defaultValue(0),
'is_deleted' => $this->boolean()->defaultValue(false),
]);
}

Expand Down
10 changes: 5 additions & 5 deletions modules/cms/src/admin/migrations/m141203_143059_cms_nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ public function safeUp()
'nav_container_id' => $this->integer(11)->notNull(),
'parent_nav_id' => $this->integer(11)->notNull(),
'sort_index' => $this->integer(11)->notNull(),
'is_deleted' => $this->boolean()->defaultValue(0),
'is_hidden' => $this->boolean()->defaultValue(0),
'is_home' => $this->boolean()->defaultValue(0),
'is_offline' => $this->boolean()->defaultValue(0),
'is_draft' => $this->boolean()->defaultValue(0),
'is_deleted' => $this->boolean()->defaultValue(false),
'is_hidden' => $this->boolean()->defaultValue(false),
'is_home' => $this->boolean()->defaultValue(false),
'is_offline' => $this->boolean()->defaultValue(false),
'is_draft' => $this->boolean()->defaultValue(false),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public function safeUp()
'prev_id' => $this->integer(11),
'json_config_values' => $this->text(),
'json_config_cfg_values' => $this->text(),
'is_dirty' => $this->boolean()->defaultValue(0),
'is_dirty' => $this->boolean()->defaultValue(false),
'create_user_id' => $this->integer(11)->defaultValue(0),
'update_user_id' => $this->integer(11)->defaultValue(0),
'timestamp_create' => $this->integer(11)->defaultValue(0),
'timestamp_update' => $this->integer(11)->defaultValue(0),
'sort_index' => $this->integer(11)->defaultValue(0),
'is_hidden' => $this->boolean()->defaultValue(0),
'is_hidden' => $this->boolean()->defaultValue(false),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public function safeUp()
$this->createTable('cms_block_group', [
'id' => $this->primaryKey(),
'name' => $this->string(255)->notNull(),
'is_deleted' => $this->boolean()->defaultValue(0),
'is_deleted' => $this->boolean()->defaultValue(false),
'identifier' => $this->string(120)->notNull(),
'created_timestamp' => $this->integer(11)->defaultValue(0),
]);
Expand Down
6 changes: 3 additions & 3 deletions modules/cms/src/admin/migrations/m151012_072207_cms_log.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ public function safeUp()
$this->createTable('cms_log', [
'id' => $this->primaryKey(),
'user_id' => $this->integer()->defaultValue(0),
'is_insertion' => $this->boolean()->defaultValue(0),
'is_update' => $this->boolean()->defaultValue(0),
'is_deletion' => $this->boolean()->defaultValue(0),
'is_insertion' => $this->boolean()->defaultValue(false),
'is_update' => $this->boolean()->defaultValue(false),
'is_deletion' => $this->boolean()->defaultValue(false),
'timestamp' => $this->integer(11)->notNull(),
'message' => $this->string(255),
'data_json' => $this->text(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public function safeUp()
$this->createTable('cms_nav_permission', [
'group_id' => $this->integer(11)->notNull(),
'nav_id' => $this->integer(11)->notNull(),
'inheritance' => $this->boolean()->defaultValue(0),
'inheritance' => $this->boolean()->defaultValue(false),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public function safeUp()
'url_found_on_page' => $this->string(255),
'group' => $this->string(120),
'last_indexed' => $this->integer(11),
'crawled' => $this->boolean()->defaultValue(0),
'crawled' => $this->boolean()->defaultValue(false),
'status_code' => $this->smallInteger(4)->defaultValue(0),
'content_hash' => $this->string(80),
'is_dublication' => $this->boolean()->defaultValue(0),
'is_dublication' => $this->boolean()->defaultValue(false),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function safeUp()
'cover_image_id' => $this->integer(11)->defaultValue(0),
'timestamp_create' => $this->integer(0)->defaultValue(0),
'timestamp_update' => $this->integer(0)->defaultValue(0),
'is_highlight' => $this->boolean()->defaultValue(0),
'is_highlight' => $this->boolean()->defaultValue(false),
'sort_index' => $this->integer()->defaultValue(0),
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public function safeUp()
'timestamp_update' => $this->integer(11)->defaultValue(0),
'timestamp_display_from' => $this->integer(11)->defaultValue(0),
'timestamp_display_until' => $this->integer(11)->defaultValue(0),
'is_deleted' => $this->boolean()->defaultValue(0),
'is_display_limit' => $this->boolean()->defaultValue(0),
'is_deleted' => $this->boolean()->defaultValue(false),
'is_display_limit' => $this->boolean()->defaultValue(false),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public function safeUp()
'id' => $this->primaryKey(),
'token' => $this->string(120)->notNull(),
'url' => $this->string(120)->notNull(),
'auth_is_enabled' => $this->boolean()->defaultValue(0),
'auth_is_enabled' => $this->boolean()->defaultValue(false),
'auth_user' => $this->string(120),
'auth_pass' => $this->string(120),
]);
Expand Down

0 comments on commit 687fd23

Please sign in to comment.