From b422be184e01b4cc35b9c9a6921379080c24edb3 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Fri, 4 Oct 2024 22:12:15 -0400 Subject: Start fresh with database migrations. The migration path from the original project inception to now was complicated and buggy, and stranded _both_ Kit and I with broken databases due to oversights and incomplete migrations. We've agreed to start fresh, once. If this is mistakenly started with an original-schema-flavour DB, startup will be aborted. --- migrations/20241005021100_event_sequence.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 migrations/20241005021100_event_sequence.sql (limited to 'migrations/20241005021100_event_sequence.sql') diff --git a/migrations/20241005021100_event_sequence.sql b/migrations/20241005021100_event_sequence.sql new file mode 100644 index 0000000..ac6821d --- /dev/null +++ b/migrations/20241005021100_event_sequence.sql @@ -0,0 +1,10 @@ +create table event_sequence ( + last_value bigint + not null +); + +create unique index event_sequence_singleton +on event_sequence (0); + +insert into event_sequence +values (0); -- cgit v1.2.3