 
 DROP TABLE IF EXISTS Translation;
 DROP TABLE IF EXISTS InstalledVersion;
+DROP TABLE IF EXISTS DefaultVersion;
 DROP TABLE IF EXISTS CountryVersion;
 DROP TABLE IF EXISTS Version;
 DROP TABLE IF EXISTS Owner;

PRIMARY KEY(countryCode, versionCode)
);
INSERT INTO CountryVersion VALUES ('WORLD', 'ARBVDPD');
-- INSERT INTO CountryVersion VALUES ('WORLD', 'CUVSPD');
-- INSERT INTO CountryVersion VALUES ('WORLD', 'CUVTPD');
INSERT INTO CountryVersion VALUES ('WORLD', 'ERV-ARB');
INSERT INTO CountryVersion VALUES ('WORLD', 'ERV-CMN');
INSERT INTO CountryVersion VALUES ('WORLD', 'ERV-ENG');
INSERT INTO CountryVersion VALUES ('WORLD', 'ERV-IND');
INSERT INTO CountryVersion VALUES ('WORLD', 'ERV-SPA');
INSERT INTO CountryVersion VALUES ('WORLD', 'ERV-POR');
INSERT INTO CountryVersion VALUES ('WORLD', 'ERV-THA');
INSERT INTO CountryVersion VALUES ('WORLD', 'ERV-VIE');
INSERT INTO CountryVersion VALUES ('WORLD', 'KJVPD');
INSERT INTO CountryVersion VALUES ('WORLD', 'NMV');
INSERT INTO CountryVersion VALUES ('WORLD', 'WEB');

-- INSERT INTO CountryVersion VALUES ('WORLD', 'RVR09PD');
-- INSERT INTO CountryVersion VALUES ('WORLD', 'ESV');
-- INSERT INTO CountryVersion VALUES ('MX', 'BLPH');
-- INSERT INTO CountryVersion VALUES ('MX', 'BLP');
-- INSERT INTO CountryVersion VALUES ('MX', 'amu');
-- INSERT INTO CountryVersion VALUES ('MX', 'azg');


CREATE TABLE InstalledVersion (
versionCode NOT NULL PRIMARY KEY REFERENCES Version(versionCode),
localeDefault NULL UNIQUE,
startDate NOT NULL,
endDate NULL
);
INSERT INTO InstalledVersion VALUES ('ARBVDPD', 'ar', '2016-06-01', null);
-- INSERT INTO InstalledVersion VALUES ('CUVSPD', 'zh', '2016-06-11', null);
-- INSERT INTO InstalledVersion VALUES ('CUVTPD', null, '2016-06-18', null);
-- INSERT INTO InstalledVersion VALUES ('ERV-ENG', null, '2016-10-01', null);
-- INSERT INTO InstalledVersion VALUES ('ERV-SPA', 'es', '2016-10-08', null);
INSERT INTO InstalledVersion VALUES ('KJVPD', null, '2016-05-16', null);
INSERT INTO InstalledVersion VALUES ('NMV', 'fa', '2016-06-27', null);
INSERT INTO InstalledVersion VALUES ('WEB', 'en', '2016-05-16', null);
-- INSERT INTO InstalledVersion VALUES ('RVR09PD', 'es', '2016-05-31', null);




INSERT INTO Version VALUES('NMV', 'pes', 'ELAM', 'NMV', 'ترجمۀ هزارۀ نو', 'BIBLE', 'NMV.db', 'F', 'F', '2016-09-06',
'The Persian New Millennium Version © 2014, is a production of Elam Ministries. All rights reserved', NULL, NULL);

-- India
INSERT INTO Version VALUES ('ERV-AWA', 'awa', 'BLI', 'ERV-AWA', 'TBD', 'BIBLE', 'ERV-AWA.db', 'T', 'F', '2016-10-17',
'copyright', NULL, NULL);
INSERT INTO Version VALUES ('ERV-BEN', 'ben', 'BLI', 'ERV-BEN', 'TBD', 'BIBLE', 'ERV-BEN.db', 'T', 'F', '2016-10-17',
'copyright', NULL, NULL);
INSERT INTO Version VALUES ('ERV-HIN', 'hin', 'BLI', 'ERV-HIN', 'TBD', 'BIBLE', 'ERV-HIN.db', 'T', 'F', '2016-10-17',
'copyright', NULL, NULL);
INSERT INTO Version VALUES ('ERV-KAN', 'kan', 'BLI', 'ERV-KAN', 'TBD', 'BIBLE', 'ERV-KAN.db', 'T', 'F', '2016-10-17',
'copyright', NULL, NULL);
INSERT INTO Version VALUES ('ERV-MAR', 'mar', 'BLI', 'ERV-MAR', 'TBD', 'BIBLE', 'ERV-MAR.db', 'T', 'F', '2016-10-17',
'copyright', NULL, NULL);
INSERT INTO Version VALUES ('ERV-ORI', 'ori', 'BLI', 'ERV-ORI', 'TBD', 'BIBLE', 'ERV-ORI.db', 'T', 'F', '2016-10-17',
'copyright', NULL, NULL);
INSERT INTO Version VALUES ('ERV-PAN', 'pan', 'BLI', 'ERV-PAN', 'TBD', 'BIBLE', 'ERV-PAN.db', 'T', 'F', '2016-10-17',
'copyright', NULL, NULL);
INSERT INTO Version VALUES ('ERV-TAM', 'tam', 'BLI', 'ERV-TAM', 'TBD', 'BIBLE', 'ERV-TAM.db', 'T', 'F', '2016-10-17',
'copyright', NULL, NULL);
INSERT INTO Version VALUES ('ERV-URD', 'urd', 'BLI', 'ERV-URD', 'TBD', 'BIBLE', 'ERV-URD.db', 'T', 'F', '2016-10-17',
'copyright', NULL, NULL);

-- Eastern Europe
INSERT INTO Version VALUES ('ERV-BUL', 'bul', 'BLI', 'ERV-BUL', 'TBD', 'BIBLE_NT', 'ERV-BUL.db', 'T', 'F', '2016-10-17',
'copyright', NULL, NULL);
INSERT INTO Version VALUES ('ERV-HRV', 'hrv', 'BLI', 'ERV-HRV', 'TBD', 'BIBLE_NT', 'ERV-HRV.db', 'T', 'F', '2016-10-17',
'copyright', NULL, NULL);
INSERT INTO Version VALUES ('ERV-HUN', 'hun', 'BLI', 'ERV-HUN', 'TBD', 'BIBLE', 'ERV-HUN.db', 'T', 'F', '2016-10-17',
'copyright', NULL, NULL);
INSERT INTO Version VALUES ('ERV-RUS', 'rus', 'BLI', 'ERV-RUS', 'TBD', 'BIBLE', 'ERV-RUS.db', 'T', 'F', '2016-10-17',
'copyright', NULL, NULL);
INSERT INTO Version VALUES ('ERV-SRP', 'srp', 'BLI', 'ERV-SRP', 'TBD', 'BIBLE', 'ERV-SRP.db', 'T', 'F', '2016-10-17',
'copyright', NULL, NULL);
INSERT INTO Version VALUES ('ERV-UKR', 'ukr', 'BLI', 'ERV-UKR', 'TBD', 'BIBLE_NT', 'ERV-UKR.db', 'T', 'F', '2016-10-17',
'copyright', NULL, NULL);




