File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change 33class FixSchemaMigrationsRls < ActiveRecord ::Migration [ 7.2 ]
44 def up
55 execute "DROP POLICY IF EXISTS schema_migrations_deny_all ON schema_migrations;"
6- execute "ALTER TABLE schema_migrations NO FORCE ROW LEVEL SECURITY;"
7- execute "ALTER TABLE schema_migrations DISABLE ROW LEVEL SECURITY;"
86 execute "DROP POLICY IF EXISTS ar_internal_metadata_deny_all ON ar_internal_metadata;"
9- execute "ALTER TABLE ar_internal_metadata NO FORCE ROW LEVEL SECURITY;"
10- execute "ALTER TABLE ar_internal_metadata DISABLE ROW LEVEL SECURITY;"
7+ execute "ALTER TABLE schema_migrations DISABLE ROW LEVEL SECURITY;" rescue nil
8+ execute "ALTER TABLE ar_internal_metadata DISABLE ROW LEVEL SECURITY;" rescue nil
119 end
1210
13- def down
14- execute "ALTER TABLE schema_migrations ENABLE ROW LEVEL SECURITY;"
15- execute "ALTER TABLE schema_migrations FORCE ROW LEVEL SECURITY;"
16- execute "CREATE POLICY schema_migrations_deny_all ON schema_migrations FOR ALL USING (false);"
17- execute "ALTER TABLE ar_internal_metadata ENABLE ROW LEVEL SECURITY;"
18- execute "ALTER TABLE ar_internal_metadata FORCE ROW LEVEL SECURITY;"
19- execute "CREATE POLICY ar_internal_metadata_deny_all ON ar_internal_metadata FOR ALL USING (false);"
20- end
11+ def down ; end
2112end
You can’t perform that action at this time.
0 commit comments