Omaha #3454 Adding sequences to tables in events schema
Change-Id: I79d03c5f97eeecdb665fee624cdae377555fa373 Former-commit-id:a13c0a8b39
[formerly306508bdbd
[formerly80879d9efa
] [formerlya13c0a8b39
[formerly fa5ec2a1866784e8b0fc0f9a6c0d3a363cbcc22d]]] Former-commit-id:306508bdbd
[formerly80879d9efa
] Former-commit-id:306508bdbd
Former-commit-id:893435c875
This commit is contained in:
parent
c77383843f
commit
8a2ca54e05
1 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This script creates sequences for the tables in the events schema
|
||||
|
||||
STATS_MAX_VAL=$(psql -U awips -d metadata -t -c "select max(id)+1 from events.stats;")
|
||||
NOTIFICATION_MAX_VAL=$(psql -U awips -d metadata -t -c "select max(id)+1 from events.notification;")
|
||||
AGGREGATE_MAX_VAL=$(psql -U awips -d metadata -t -c "select max(id)+1 from events.aggregate;")
|
||||
|
@ -22,4 +24,5 @@ fi
|
|||
psql -U awips -d metadata -c \
|
||||
"CREATE SEQUENCE stats_seq START WITH $STATS_MAX_VAL; \
|
||||
CREATE SEQUENCE notification_seq START WITH $NOTIFICATION_MAX_VAL; \
|
||||
CREATE SEQUENCE aggregate_seq START WITH $NOTIFICATION_MAX_VAL;"
|
||||
CREATE SEQUENCE aggregate_seq START WITH $AGGREGATE_MAX_VAL;"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue