Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mandrill 1-0-1 schemas support #763

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
3 changes: 2 additions & 1 deletion jsonpaths/com.mandrill/message_bounced_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"$.data.msg.ts",
"$.data.msg.smpt_events",
"$.data.msg.resends",
"$.data.msg.template"
"$.data.msg.template",
"$.data.msg.subaccount"
]
}
3 changes: 2 additions & 1 deletion jsonpaths/com.mandrill/message_clicked_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"$.data.user_agent_parsed.ua_name",
"$.data.user_agent_parsed.ua_url",
"$.data.user_agent_parsed.ua_version",
"$.data.user_agent"
"$.data.user_agent",
"$.data.msg.subaccount"
]
}
3 changes: 2 additions & 1 deletion jsonpaths/com.mandrill/message_delayed_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"$.data.msg.tags",
"$.data.msg.ts",
"$.data.msg.resends",
"$.data.msg.template"
"$.data.msg.template",
"$.data.msg.subaccount"
]
}
3 changes: 2 additions & 1 deletion jsonpaths/com.mandrill/message_marked_as_spam_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"$.data.msg.state",
"$.data.msg.subject",
"$.data.msg.tags",
"$.data.msg.ts"
"$.data.msg.ts",
"$.data.msg.subaccount"
]
}
3 changes: 2 additions & 1 deletion jsonpaths/com.mandrill/message_opened_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"$.data.user_agent_parsed.ua_name",
"$.data.user_agent_parsed.ua_url",
"$.data.user_agent_parsed.ua_version",
"$.data.user_agent"
"$.data.user_agent",
"$.data.msg.subaccount"
]
}
3 changes: 2 additions & 1 deletion jsonpaths/com.mandrill/message_soft_bounced_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"$.data.msg.ts",
"$.data.msg.resends",
"$.data.msg.smtp_events",
"$.data.msg.template"
"$.data.msg.template",
"$.data.msg.subaccount"
]
}
3 changes: 2 additions & 1 deletion jsonpaths/com.mandrill/recipient_unsubscribed_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"$.data.msg.state",
"$.data.msg.subject",
"$.data.msg.tags",
"$.data.msg.ts"
"$.data.msg.ts",
"$.data.msg.subaccount"
]
}
1 change: 1 addition & 0 deletions sql/com.mandrill/message_bounced_1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ CREATE TABLE atomic.com_mandrill_message_bounced_1 (
"msg.smtp_events" varchar(5000) encode runlength, -- Holds a JSON array
"msg.resends" varchar(5000) encode raw,
"msg.template" varchar encode text32k,
"msg.subaccount" varchar(255) encode raw,
FOREIGN KEY(root_id) REFERENCES atomic.events(event_id)
)
DISTSTYLE KEY
Expand Down
1 change: 1 addition & 0 deletions sql/com.mandrill/message_clicked_1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ CREATE TABLE atomic.com_mandrill_message_clicked_1 (
"user_agent_parsed.ua_url" varchar(255) encode raw,
"user_agent_parsed.ua_version" varchar(255) encode raw,
user_agent varchar(255) encode raw,
"msg.subaccount" varchar(255) encode raw,
FOREIGN KEY(root_id) REFERENCES atomic.events(event_id)
)
DISTSTYLE KEY
Expand Down
1 change: 1 addition & 0 deletions sql/com.mandrill/message_delayed_1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ CREATE TABLE atomic.com_mandrill_message_delayed_1 (
"msg.ts" timestamp encode raw,
"msg.resends" varchar(2048) encode runlength, -- Holds a JSON array
"msg.template" varchar(255) encode text32k,
"msg.subaccount" varchar(255) encode raw,
FOREIGN KEY(root_id) REFERENCES atomic.events(event_id)
)
DISTSTYLE KEY
Expand Down
1 change: 1 addition & 0 deletions sql/com.mandrill/message_marked_as_spam_1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ CREATE TABLE atomic.com_mandrill_message_marked_as_spam_1 (
"msg.subject" varchar(255) encode raw,
"msg.tags" varchar(2048) encode runlength, -- Holds a JSON array
"msg.ts" timestamp encode raw,
"msg.subaccount" varchar(255) encode raw,
FOREIGN KEY(root_id) REFERENCES atomic.events(event_id)
)
DISTSTYLE KEY
Expand Down
1 change: 1 addition & 0 deletions sql/com.mandrill/message_opened_1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ CREATE TABLE atomic.com_mandrill_message_opened_1 (
"user_agent_parsed.ua_url" varchar(255) encode raw,
"user_agent_parsed.ua_version" varchar(255) encode raw,
user_agent varchar(255) encode raw,
"msg.subaccount" varchar(255) encode raw,
FOREIGN KEY(root_id) REFERENCES atomic.events(event_id)
)
DISTSTYLE KEY
Expand Down
1 change: 1 addition & 0 deletions sql/com.mandrill/message_soft_bounced_1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ CREATE TABLE atomic.com_mandrill_message_soft_bounced_1 (
"msg.resends" varchar(5000) encode runlength, -- Holds a JSON array
"msg.smtp_events" varchar(5000) encode runlength, -- Holds a JSON array
"msg.template" varchar(255) encode text255,
"msg.subaccount" varchar(255) encode raw,
FOREIGN KEY(root_id) REFERENCES atomic.events(event_id)
)
DISTSTYLE KEY
Expand Down
14 changes: 14 additions & 0 deletions sql/com.mandrill/migrate_message_bounced_1_r0_to_r1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- WARNING: only apply this file to your database if the following SQL returns the expected:
--
-- SELECT pg_catalog.obj_description(c.oid) FROM pg_catalog.pg_class c WHERE c.relname = 'com_mandrill_message_bounced_1';
-- obj_description
-- -----------------
-- iglu:com.mandrill/message_bounced/jsonschema/1-0-0
-- (1 row)

BEGIN TRANSACTION;

ALTER TABLE atomic.com_mandrill_message_bounced_1
ADD COLUMN "msg.subaccount" VARCHAR(255) ENCODE raw;

END TRANSACTION;
14 changes: 14 additions & 0 deletions sql/com.mandrill/migrate_message_clicked_1_r0_to_r1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- WARNING: only apply this file to your database if the following SQL returns the expected:
--
-- SELECT pg_catalog.obj_description(c.oid) FROM pg_catalog.pg_class c WHERE c.relname = 'com_mandrill_message_clicked_1';
-- obj_description
-- -----------------
-- iglu:com.mandrill/message_clicked/jsonschema/1-0-0
-- (1 row)

BEGIN TRANSACTION;

ALTER TABLE atomic.com_mandrill_message_clicked_1
ADD COLUMN "msg.subaccount" VARCHAR(255) ENCODE raw;

END TRANSACTION;
14 changes: 14 additions & 0 deletions sql/com.mandrill/migrate_message_delayed_1_r0_to_r1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- WARNING: only apply this file to your database if the following SQL returns the expected:
--
-- SELECT pg_catalog.obj_description(c.oid) FROM pg_catalog.pg_class c WHERE c.relname = 'com_mandrill_message_delayed_1';
-- obj_description
-- -----------------
-- iglu:com.mandrill/message_delayed/jsonschema/1-0-0
-- (1 row)

BEGIN TRANSACTION;

ALTER TABLE atomic.com_mandrill_message_delayed_1
ADD COLUMN "msg.subaccount" VARCHAR(255) ENCODE raw;

END TRANSACTION;
14 changes: 14 additions & 0 deletions sql/com.mandrill/migrate_message_marked_as_spam_1_r0_to_r1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- WARNING: only apply this file to your database if the following SQL returns the expected:
--
-- SELECT pg_catalog.obj_description(c.oid) FROM pg_catalog.pg_class c WHERE c.relname = 'com_mandrill_message_marked_as_spam_1';
-- obj_description
-- -----------------
-- iglu:com.mandrill/message_marked_as_spam/jsonschema/1-0-0
-- (1 row)

BEGIN TRANSACTION;

ALTER TABLE atomic.com_mandrill_message_marked_as_spam_1
ADD COLUMN "msg.subaccount" VARCHAR(255) ENCODE raw;

END TRANSACTION;
14 changes: 14 additions & 0 deletions sql/com.mandrill/migrate_message_opened_1_r0_to_r1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- WARNING: only apply this file to your database if the following SQL returns the expected:
--
-- SELECT pg_catalog.obj_description(c.oid) FROM pg_catalog.pg_class c WHERE c.relname = 'com_mandrill_message_opened_1';
-- obj_description
-- -----------------
-- iglu:com.mandrill/message_opened/jsonschema/1-0-0
-- (1 row)

BEGIN TRANSACTION;

ALTER TABLE atomic.com_mandrill_message_opened_1
ADD COLUMN "msg.subaccount" VARCHAR(255) ENCODE raw;

END TRANSACTION;
14 changes: 14 additions & 0 deletions sql/com.mandrill/migrate_message_soft_bounced_1_r0_to_r1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- WARNING: only apply this file to your database if the following SQL returns the expected:
--
-- SELECT pg_catalog.obj_description(c.oid) FROM pg_catalog.pg_class c WHERE c.relname = 'com_mandrill_message_soft_bounced_1';
-- obj_description
-- -----------------
-- iglu:com.mandrill/message_soft_bounced/jsonschema/1-0-0
-- (1 row)

BEGIN TRANSACTION;

ALTER TABLE atomic.com_mandrill_message_soft_bounced_1
ADD COLUMN "msg.subaccount" VARCHAR(255) ENCODE raw;

END TRANSACTION;
14 changes: 14 additions & 0 deletions sql/com.mandrill/migrate_recipient_unsubscribed_1_r0_to_r1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- WARNING: only apply this file to your database if the following SQL returns the expected:
--
-- SELECT pg_catalog.obj_description(c.oid) FROM pg_catalog.pg_class c WHERE c.relname = 'com_mandrill_recipient_unsubscribed_1';
-- obj_description
-- -----------------
-- iglu:com.mandrill/recipient_unsubscribed/jsonschema/1-0-0
-- (1 row)

BEGIN TRANSACTION;

ALTER TABLE atomic.com_mandrill_recipient_unsubscribed_1
ADD COLUMN "msg.subaccount" VARCHAR(255) ENCODE raw;

END TRANSACTION;
1 change: 1 addition & 0 deletions sql/com.mandrill/recipient_unsubscribed_1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ CREATE TABLE atomic.com_mandrill_recipient_unsubscribed_1 (
"msg.subject" varchar(255) encode raw,
"msg.tags" varchar(2048) encode runlength, -- Holds a JSON array
"msg.ts" timestamp encode raw,
"msg.subaccount" varchar(255) encode raw,
FOREIGN KEY(root_id) REFERENCES atomic.events(event_id)
)
DISTSTYLE KEY
Expand Down