Skip to content

Commit

Permalink
Fixed migration script mistakes (#837) (#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
fblundun committed Jun 25, 2014
1 parent a88265c commit 85fb675
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions 4-storage/postgres-storage/sql/migrate_0.2.0_to_0.3.0.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (c) 2013 Snowplow Analytics Ltd. All rights reserved.
-- Copyright (c) 2014 Snowplow Analytics Ltd. All rights reserved.
--
-- This program is licensed to you under the Apache License Version 2.0,
-- and you may not use this file except in compliance with the Apache License Version 2.0.
Expand Down Expand Up @@ -260,4 +260,4 @@ INSERT INTO atomic.events
"doc_charset",
"doc_width",
"doc_height"
FROM atomic.events_01x;
FROM atomic.events_020;
20 changes: 10 additions & 10 deletions 4-storage/redshift-storage/sql/migrate_0.3.0_to_0.4.0.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (c) 2013 Snowplow Analytics Ltd. All rights reserved.
-- Copyright (c) 2014 Snowplow Analytics Ltd. All rights reserved.
--
-- This program is licensed to you under the Apache License Version 2.0,
-- and you may not use this file except in compliance with the Apache License Version 2.0.
Expand All @@ -9,7 +9,7 @@
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
--
-- Version: Ports version 0.2.2 to version 0.3.0
-- Version: Ports version 0.3.0 to version 0.4.0
-- URL: -
--
-- Authors: Fred Blundun
Expand All @@ -31,10 +31,10 @@ CREATE TABLE atomic.events (
-- Event
event varchar(128) encode text255,
-- Removed event_vendor in 0.4.0
event_id char(36) not null unique, -- Changed from varchar(38) in 0.3.0
event_id char(36) not null unique,
txn_id int,
-- Namespacing and versioning
name_tracker varchar(128) encode text255, -- Added in 0.3.0
name_tracker varchar(128) encode text255,
v_tracker varchar(100) encode text255,
v_collector varchar(100) encode text255 not null,
v_etl varchar(100) encode text255 not null,
Expand All @@ -53,9 +53,9 @@ CREATE TABLE atomic.events (
geo_latitude double precision,
geo_longitude double precision,
-- Page
page_url varchar(4096), -- Added in 0.3.0
page_url varchar(4096),
page_title varchar(2000),
page_referrer varchar(4096), -- Added in 0.3.0
page_referrer varchar(4096),
-- Page URL components
page_urlscheme varchar(16) encode text255,
page_urlhost varchar(255) encode text255,
Expand All @@ -81,7 +81,7 @@ CREATE TABLE atomic.events (
mkt_content varchar(500) encode raw,
mkt_campaign varchar(255) encode text32k,
-- Custom contexts
contexts varchar(10000) encode raw, -- Added in 0.3.0
contexts varchar(10000) encode raw,
-- Custom structured event
se_category varchar(255) encode text255,
se_action varchar(255) encode text255,
Expand Down Expand Up @@ -147,10 +147,10 @@ CREATE TABLE atomic.events (
doc_charset varchar(128) encode text255,
doc_width integer,
doc_height integer,
CONSTRAINT event_id_040_pk PRIMARY KEY(event_id) -- Made constraint version-specific in 0.3.0
CONSTRAINT event_id_040_pk PRIMARY KEY(event_id)
)
DISTSTYLE KEY
DISTKEY (event_id) -- Changed from domain_userid in 0.3.0
DISTKEY (event_id)
SORTKEY (collector_tstamp);

-- Now copy into new from events_old
Expand Down Expand Up @@ -261,4 +261,4 @@ INSERT INTO atomic.events
doc_charset,
doc_width,
doc_height
FROM atomic.events_022;
FROM atomic.events_030;

0 comments on commit 85fb675

Please sign in to comment.