make migrations up only
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class MigratePostFilesToHasAuxTable < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
def up
|
||||
mirai_tablespace!
|
||||
|
||||
create_aux_table :domain_post_files, :inkbunny do |t|
|
||||
@@ -39,5 +39,7 @@ class MigratePostFilesToHasAuxTable < ActiveRecord::Migration[7.2]
|
||||
FROM domain_post_files
|
||||
WHERE type = 'Domain::PostFile::InkbunnyPostFile'
|
||||
SQL
|
||||
|
||||
# TODO - add foreign key constraints on base_table_id
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class AddColumnsToPostFiles < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
def up
|
||||
change_table :domain_post_files do |t|
|
||||
t.string :state
|
||||
t.string :url_str
|
||||
@@ -18,5 +18,10 @@ class AddColumnsToPostFiles < ActiveRecord::Migration[7.2]
|
||||
SQL
|
||||
|
||||
change_column_null :domain_post_files, :state, false
|
||||
# TODO - drop json_attributes column
|
||||
end
|
||||
|
||||
def down
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user