mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 10:11:13 -05:00
21 lines
795 B
SQL
21 lines
795 B
SQL
-- Drop old JSONB versioning system completely
|
|
-- This removes all deprecated tables and functions
|
|
|
|
-- Drop dependent tables first
|
|
DROP TABLE IF EXISTS public.version_diffs CASCADE;
|
|
DROP TABLE IF EXISTS public.entity_relationships_history CASCADE;
|
|
DROP TABLE IF EXISTS public.entity_field_history CASCADE;
|
|
|
|
-- Drop main legacy table (archive remains)
|
|
DROP TABLE IF EXISTS public.entity_versions CASCADE;
|
|
|
|
-- Drop old RPC functions
|
|
DROP FUNCTION IF EXISTS public.create_entity_version(
|
|
text, uuid, jsonb, uuid, text, uuid, version_change_type
|
|
) CASCADE;
|
|
|
|
DROP FUNCTION IF EXISTS public.compare_versions(uuid, uuid) CASCADE;
|
|
|
|
DROP FUNCTION IF EXISTS public.create_field_history_entries(uuid, jsonb, jsonb) CASCADE;
|
|
|
|
-- Note: We keep rollback_to_version as it's been updated for relational system |