From 83a6edb2575fac4f9a701c8d4fe124a1ab6c5758 Mon Sep 17 00:00:00 2001 From: Alessio Date: Mon, 26 Dec 2022 12:56:05 -0500 Subject: [PATCH] Fix migrations to not have nulls --- persistence/versions.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/persistence/versions.go b/persistence/versions.go index 98b1781..5b74f86 100644 --- a/persistence/versions.go +++ b/persistence/versions.go @@ -81,12 +81,12 @@ var MIGRATIONS = []string{ create index if not exists index_images_tweet_id on images (tweet_id); create index if not exists index_videos_tweet_id on videos (tweet_id);`, `alter table spaces add column created_by_id integer references users(id); - alter table spaces add column state text not null; - alter table spaces add column title text not null; - alter table spaces add column created_at integer not null; - alter table spaces add column started_at integer not null; - alter table spaces add column ended_at integer not null; - alter table spaces add column updated_at integer not null; + alter table spaces add column state text not null default ""; + alter table spaces add column title text not null default ""; + alter table spaces add column created_at integer; + alter table spaces add column started_at integer; + alter table spaces add column ended_at integer; + alter table spaces add column updated_at integer; alter table spaces add column is_available_for_replay boolean not null; alter table spaces add column replay_watch_count integer; alter table spaces add column live_listeners_count integer;