-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migration keep :deleted_on as the only only source of truth for disco…
…nnect Migration keep :deleted_on as the only only source of truth for disconnect
- Loading branch information
Showing
2 changed files
with
12 additions
and
23 deletions.
There are no files selected for viewing
31 changes: 10 additions & 21 deletions
31
db/migrate/20170530102506_add_deleted_to_containers_tables.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,14 @@ | ||
class AddDeletedToContainersTables < ActiveRecord::Migration[5.0] | ||
def change | ||
add_column :container_definitions, :deleted, :boolean, :default => false, :null => false | ||
add_column :container_groups, :deleted, :boolean, :default => false, :null => false | ||
add_column :container_images, :deleted, :boolean, :default => false, :null => false | ||
add_column :container_projects, :deleted, :boolean, :default => false, :null => false | ||
add_column :containers, :deleted, :boolean, :default => false, :null => false | ||
|
||
add_index :container_definitions, :deleted, | ||
:name => "index_container_definitions_on_deleted_false", | ||
:where => "NOT deleted" | ||
add_index :container_groups, :deleted, | ||
:name => "container_groups_on_deleted_false", | ||
:where => "NOT deleted" | ||
add_index :container_images, :deleted, | ||
:name => "index_container_images_on_deleted_false", | ||
:where => "NOT deleted" | ||
add_index :container_projects, :deleted, | ||
:name => "index_container_projects_on_deleted_false", | ||
:where => "NOT deleted" | ||
add_index :containers, :deleted, | ||
:name => "index_containers_on_deleted_false", | ||
:where => "NOT deleted" | ||
add_index :container_definitions, :deleted_on, | ||
:name => "index_container_definitions_on_deleted_on" | ||
add_index :container_groups, :deleted_on, | ||
:name => "container_groups_on_deleted_on" | ||
add_index :container_images, :deleted_on, | ||
:name => "index_container_images_on_deleted_on" | ||
add_index :container_projects, :deleted_on, | ||
:name => "index_container_projects_on_deleted_on" | ||
add_index :containers, :deleted_on, | ||
:name => "index_containers_on_deleted_on" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters