diff --git a/setup b/setup index 49ef2cb..0006fa5 100755 --- a/setup +++ b/setup @@ -50,7 +50,8 @@ else setup_dedicated fi -heroku pg:psql -c 'create table windowed_counts(id serial primary key not null, time_window bigint not null, word text, count bigint not null);' HEROKU_POSTGRESQL_URL -a ${APP_NAME} +heroku pg:psql -c 'CREATE TABLE windowed_counts(id serial primary key NOT NULL, time_window bigint NOT NULL, word text, count bigint NOT NULL);' HEROKU_POSTGRESQL_URL -a ${APP_NAME} +heroku pg:psql -c 'CREATE UNIQUE INDEX windowed_counts_time_window_word ON windowed_counts(word text_ops,time_window int8_ops);' HEROKU_POSTGRESQL_URL -a ${APP_NAME} heroku ps:scale text_processor_worker=1 -a ${APP_NAME} heroku ps:scale aggregator_worker=1 -a ${APP_NAME}