· 9 years ago · Dec 26, 2016, 11:12 AM
1Unsuccessfully verified health of [cassandra-service] with result [Failed to upload schema [Will not retry!] because of Content of existing script 9.1.cql differs from new one.
2Existing content: [create table if not exists ssd.coordinator(
3 lock_name text,
4 owner text,
5 lock_date timestamp,
6 PRIMARY KEY (lock_name)
7) WITH
8 caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'} AND
9 compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'};
10
11// pubnub webhook removal
12
13ALTER TABLE ssd.subscription_by_id ADD device_token text;
14
15CREATE MATERIALIZED VIEW IF NOT EXISTS ssd.sub_by_device AS
16 SELECT id, device_token FROM ssd.subscription_by_id
17 WHERE device_token IS NOT NULL
18 PRIMARY KEY ((device_token), id)
19 WITH
20 caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'} AND
21 compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'};]
22New content: [CREATE TABLE IF NOT EXISTS ssd.coordinator(
23 lock_name text,
24 last_owner text,
25 lock_owner text,
26 lock_date timestamp,
27 PRIMARY KEY (lock_name)
28) WITH
29 caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'} AND
30 compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'};
31
32// pubnub webhook removal
33
34ALTER TABLE ssd.subscription_by_id ADD device_token text;
35
36CREATE MATERIALIZED VIEW IF NOT EXISTS ssd.sub_by_device AS
37 SELECT id, device_token FROM ssd.subscription_by_id
38 WHERE device_token IS NOT NULL
39 PRIMARY KEY ((device_token), id)
40 WITH
41 caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'} AND
42 compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'};
43
44// reminders
45
46CREATE TABLE IF NOT EXISTS ssd.reminders_journal(
47 journal_id text,
48 last_reminders_collect_time timestamp,
49 PRIMARY KEY (journal_id)
50) WITH
51 caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'} AND
52 compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'};
53
54CREATE TABLE IF NOT EXISTS ssd.reminders(
55 next_reminder_time_hour bigint,
56 next_reminder_time timestamp,
57 subscription_id text,
58 interval_in_sec bigint,
59 expiration_time timestamp,
60 PRIMARY KEY ((next_reminder_time_hour), next_reminder_time, subscription_id)
61) WITH
62 caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'} AND
63 compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'};
64]]