FIX: Missed one. Sequences need to be set to at least 1

This commit is contained in:
Daniel Waterworth 2020-09-07 19:32:23 +01:00
parent b831d736ca
commit 49a76c9edb
1 changed files with 1 additions and 1 deletions

View File

@ -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