Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed problem: schema update 5 accitentially pasted into 4.
git-svn-id: https://svn.cocoanetics.com/myappsales/trunk@180 3a964c32-7461-4f60-ae82-ad05498e24dc
- Loading branch information
oliver
committed
Nov 11, 2009
1 parent
2142fc0
commit 2f1b64e
Showing
2 changed files
with
45 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,40 @@ | ||
/* Script to update apps.db from schema version 4 to 5 */ | ||
/* Script to update apps.db from schema version 3 to 4 */ | ||
|
||
begin exclusive transaction; | ||
|
||
/* Remove index causing problems */ | ||
/* fix incorrect language for Turkey */ | ||
|
||
drop index app_name; | ||
UPDATE Country SET language="tr", app_store_id=143480 WHERE ISO2="TR"; | ||
|
||
/* fix writing so that country is found for Jan 2009 report */ | ||
update country set Name = 'Great Britain' where iso2 = 'GB'; | ||
update country set name = 'Taiwan' where iso2 = 'TW'; | ||
update country set name = 'Russian Fed.' where iso2 = 'RU'; | ||
update country set name = 'South Korea' where iso2 = 'KR'; | ||
update country set name = 'Unit.Arab Emir.' where iso2 = 'AE'; | ||
update country set name = 'Czech. Republic' where iso2 = 'CZ'; | ||
|
||
|
||
/* add account table */ | ||
|
||
CREATE TABLE AppGrouping (id INTEGER PRIMARY KEY, description VARCHAR); | ||
|
||
/* add accountapps table */ | ||
|
||
CREATE TABLE AppAppGrouping( app_id INTEGER PRIMARY KEY, appgrouping_id INTEGER); | ||
|
||
/* add accountapps table */ | ||
|
||
CREATE TABLE ReportAppGrouping (report_id INTEGER PRIMARY KEY, appgrouping_id INTEGER); | ||
|
||
/* set defaults, assume that all reports came from same app grouping aka account */ | ||
|
||
insert into AppGrouping (id, description) values (1, 'Default'); | ||
insert into AppAppGrouping (app_id, appgrouping_id) select distinct app_id, 1 from sale; | ||
insert into ReportAppGrouping (report_id, appgrouping_id) select distinct id, 1 from report; | ||
|
||
/* update schema_version */ | ||
|
||
/* | ||
update meta set schema_version = 4; | ||
*/ | ||
|
||
commit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* Script to update apps.db from schema version 4 to 5 */ | ||
|
||
begin exclusive transaction; | ||
|
||
/* Remove index causing problems */ | ||
|
||
drop index if exists app_name; | ||
|
||
/* update schema_version */ | ||
|
||
/* | ||
update meta set schema_version = 4; | ||
*/ | ||
commit; |