From 2478963a6ba0268c40fc2947a5824a546fba873e Mon Sep 17 00:00:00 2001
From: Marcin Ickiewicz <mickiewicz@syncad.com>
Date: Wed, 8 Jan 2025 11:37:20 +0100
Subject: [PATCH] remove hafd.table_schema table

After many changes hash computed on databse could only be used to
check if  hfm can be updated to a given new version. The hash cannot be used
to check if the database schema for a given hfm version was modified,
becuase it does not take all haf elements for computation. It means
there is no need to have stored hash of the databas because it has no
usage, moreover it is misleading and could mask that the some parts of
 the schema was modified.

Warning: the change modifies hafd schema, what means that old hfm
versions cannot be updated to it.
---
 src/hive_fork_manager/CMakeLists.txt                  | 1 -
 src/hive_fork_manager/context_rewind/table_schema.sql | 9 ---------
 2 files changed, 10 deletions(-)
 delete mode 100644 src/hive_fork_manager/context_rewind/table_schema.sql

diff --git a/src/hive_fork_manager/CMakeLists.txt b/src/hive_fork_manager/CMakeLists.txt
index d103c0c30..5bc45ddcf 100644
--- a/src/hive_fork_manager/CMakeLists.txt
+++ b/src/hive_fork_manager/CMakeLists.txt
@@ -4,7 +4,6 @@ ADD_PSQL_EXTENSION(
              context_rewind/data_schema_types.sql
              application_loop/stages.sql
              context_rewind/data_schema.sql
-             context_rewind/table_schema.sql
              events_queue.sql
              forks.sql
              app_context.sql
diff --git a/src/hive_fork_manager/context_rewind/table_schema.sql b/src/hive_fork_manager/context_rewind/table_schema.sql
deleted file mode 100644
index b0224f319..000000000
--- a/src/hive_fork_manager/context_rewind/table_schema.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-CREATE TABLE IF NOT EXISTS hafd.table_schema(
-    schema_name TEXT NOT NULL,
-    schema_hash UUID NOT NULL
-);
-
-SELECT pg_catalog.pg_extension_config_dump('hafd.table_schema', '');
-
-
-
-- 
GitLab