From 49a76c9edb8c3f92c131615969f7170d5c5e6308 Mon Sep 17 00:00:00 2001 From: Daniel Waterworth Date: Mon, 7 Sep 2020 19:32:23 +0100 Subject: [PATCH] FIX: Missed one. Sequences need to be set to at least 1 --- db/migrate/20200810053843_create_data_explorer_queries.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20200810053843_create_data_explorer_queries.rb b/db/migrate/20200810053843_create_data_explorer_queries.rb index 4324851..f7a3e0f 100644 --- a/db/migrate/20200810053843_create_data_explorer_queries.rb +++ b/db/migrate/20200810053843_create_data_explorer_queries.rb @@ -75,7 +75,7 @@ class CreateDataExplorerQueries < ActiveRecord::Migration[6.0] SELECT setval( pg_get_serial_sequence('data_explorer_queries', 'id'), - (select max(id) from data_explorer_queries) + (select greatest(max(id), 1) from data_explorer_queries) ); SQL end