remove e621 user post fav rows migration

This commit is contained in:
Dylan Knutson
2025-08-20 23:47:03 +00:00
parent deff73d73a
commit 3021bc4a97
2 changed files with 17 additions and 2 deletions

View 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

View File

@@ -1,4 +1,4 @@
\restrict fsnJecu1BUZk39yUe5E3zqbZEe6yKihIQHKEWYdhLLHCBtdUoLtB3L0VBXECSF8
\restrict 7TzA6fck7UXmbJ75eMoJZOwzcgQ2b4cZTq1JfFKiTdNPzDaeWqx6fddlLy7O3Jz
-- 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)
@@ -6129,11 +6129,12 @@ ALTER TABLE ONLY public.domain_twitter_tweets
-- PostgreSQL database dump complete
--
\unrestrict fsnJecu1BUZk39yUe5E3zqbZEe6yKihIQHKEWYdhLLHCBtdUoLtB3L0VBXECSF8
\unrestrict 7TzA6fck7UXmbJ75eMoJZOwzcgQ2b4cZTq1JfFKiTdNPzDaeWqx6fddlLy7O3Jz
SET search_path TO "$user", public;
INSERT INTO "schema_migrations" (version) VALUES
('20250820230131'),
('20250820215340'),
('20250820212318'),
('20250820210922'),