make migrations up only

This commit is contained in:
Dylan Knutson
2025-07-18 15:57:05 +00:00
parent e67eb94e44
commit 8e00a7578c
2 changed files with 9 additions and 2 deletions

View File

@@ -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

View File

@@ -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