use RESTART instead of START with ALTER SEQUENCE

This commit is contained in:
Sebastian Hugentobler 2019-11-02 15:07:25 +01:00
parent 4849cc33f4
commit 7fb0542ac2

View File

@ -3,7 +3,7 @@
if [ "$DB_TYPE" == "postgres" ]; then
# starting at 3 because the
psql --host "$DB_HOST" --port "$DB_PORT" --username "$DB_USER" --dbname "$DB_NAME" --command \
"ALTER SEQUENCE users_id_seq START WITH 3;"
"ALTER SEQUENCE users_id_seq RESTART WITH 3;"
sql --host "$DB_HOST" --port "$DB_PORT" --username "$DB_USER" --dbname "$DB_NAME" --command \
"ALTER SEQUENCE groups_id_seq START WITH 3;"
"ALTER SEQUENCE groups_id_seq RESTART WITH 3;"
fi