remove e621 user post fav rows migration
This commit is contained in:
14
db/migrate/20250820230131_remove_e621_user_post_fav_rows.rb
Normal file
14
db/migrate/20250820230131_remove_e621_user_post_fav_rows.rb
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
class RemoveE621UserPostFavRows < ActiveRecord::Migration[7.2]
|
||||||
|
def up
|
||||||
|
execute <<-SQL
|
||||||
|
DELETE FROM domain_user_post_favs
|
||||||
|
WHERE user_id IN (
|
||||||
|
SELECT base_table_id FROM domain_users_e621_aux
|
||||||
|
)
|
||||||
|
SQL
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
raise ActiveRecord::IrreversibleMigration
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
\restrict fsnJecu1BUZk39yUe5E3zqbZEe6yKihIQHKEWYdhLLHCBtdUoLtB3L0VBXECSF8
|
\restrict 7TzA6fck7UXmbJ75eMoJZOwzcgQ2b4cZTq1JfFKiTdNPzDaeWqx6fddlLy7O3Jz
|
||||||
|
|
||||||
-- Dumped from database version 17.6 (Debian 17.6-1.pgdg13+1)
|
-- Dumped from database version 17.6 (Debian 17.6-1.pgdg13+1)
|
||||||
-- Dumped by pg_dump version 17.6 (Debian 17.6-1.pgdg12+1)
|
-- Dumped by pg_dump version 17.6 (Debian 17.6-1.pgdg12+1)
|
||||||
@@ -6129,11 +6129,12 @@ ALTER TABLE ONLY public.domain_twitter_tweets
|
|||||||
-- PostgreSQL database dump complete
|
-- PostgreSQL database dump complete
|
||||||
--
|
--
|
||||||
|
|
||||||
\unrestrict fsnJecu1BUZk39yUe5E3zqbZEe6yKihIQHKEWYdhLLHCBtdUoLtB3L0VBXECSF8
|
\unrestrict 7TzA6fck7UXmbJ75eMoJZOwzcgQ2b4cZTq1JfFKiTdNPzDaeWqx6fddlLy7O3Jz
|
||||||
|
|
||||||
SET search_path TO "$user", public;
|
SET search_path TO "$user", public;
|
||||||
|
|
||||||
INSERT INTO "schema_migrations" (version) VALUES
|
INSERT INTO "schema_migrations" (version) VALUES
|
||||||
|
('20250820230131'),
|
||||||
('20250820215340'),
|
('20250820215340'),
|
||||||
('20250820212318'),
|
('20250820212318'),
|
||||||
('20250820210922'),
|
('20250820210922'),
|
||||||
|
|||||||
Reference in New Issue
Block a user