aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2021-05-12 13:24:35 +0300
committerFilipp Lepalaan <filipp@mac.com>2021-05-12 13:24:35 +0300
commit4581765f5f278f60d718726ae15efccb689f2217 (patch)
tree94cf5c077c9474a5fba5dbc03c73df4c2e8c7a68
parenta8369dd63031471e185f38f4bfffaddeeeb3bd3c (diff)
downloadServo-4581765f5f278f60d718726ae15efccb689f2217.tar.gz
Servo-4581765f5f278f60d718726ae15efccb689f2217.tar.bz2
Servo-4581765f5f278f60d718726ae15efccb689f2217.zip
Halt on failed migration
-rwxr-xr-xinstall.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/install.py b/install.py
index 2732597..c03de46 100755
--- a/install.py
+++ b/install.py
@@ -48,7 +48,8 @@ fh.write(s)
fh.close()
print("** Setting up database tables **")
-call(['./manage.py', 'migrate'])
+assert call(['./manage.py', 'migrate']) == 0, "Failed to create database tables"
+
call(['psql', '-c', 'ALTER SEQUENCE servo_order_id_seq RESTART WITH 12345', args['dbname'], args['dbuser']])
print("** Creating directories **")