Refactor data insertion via Drizzle

This commit is contained in:
Sean Morley
2024-04-26 22:43:13 +00:00
parent 37f050d254
commit 319a99fed2
25 changed files with 1511 additions and 661 deletions

View File

@@ -1,39 +1,39 @@
INSERT INTO "worldTravelCountryRegions" (id, name, country_code)
VALUES
('IN-AN', 'Andaman and Nicobar Islands', 'in'),
('IN-AP', 'Andhra Pradesh', 'in'),
('IN-AR', 'Arunachal Pradesh', 'in'),
('IN-AS', 'Assam', 'in'),
('IN-BR', 'Bihar', 'in'),
('IN-CH', 'Chandigarh', 'in'),
('IN-CT', 'Chhattisgarh', 'in'),
('IN-DN', 'Dadra and Nagar Haveli and Daman and Diu', 'in'),
('IN-DD', 'Daman and Diu', 'in'), -- These IDs are consolidated now, but adding separately for compatibility
('IN-DL', 'Delhi', 'in'),
('IN-GA', 'Goa', 'in'),
('IN-GJ', 'Gujarat', 'in'),
('IN-HR', 'Haryana', 'in'),
('IN-HP', 'Himachal Pradesh', 'in'),
('IN-JH', 'Jharkhand', 'in'),
('IN-KA', 'Karnataka', 'in'),
('IN-KL', 'Kerala', 'in'),
('IN-LD', 'Lakshadweep', 'in'),
('IN-MP', 'Madhya Pradesh', 'in'),
('IN-MH', 'Maharashtra', 'in'),
('IN-MN', 'Manipur', 'in'),
('IN-ML', 'Meghalaya', 'in'),
('IN-MZ', 'Mizoram', 'in'),
('IN-NL', 'Nagaland', 'in'),
('IN-OR', 'Odisha', 'in'),
('IN-PY', 'Puducherry', 'in'),
('IN-PB', 'Punjab', 'in'),
('IN-RJ', 'Rajasthan', 'in'),
('IN-SK', 'Sikkim', 'in'),
('IN-TN', 'Tamil Nadu', 'in'),
('IN-TG', 'Telangana', 'in'),
('IN-TR', 'Tripura', 'in'),
('IN-UP', 'Uttar Pradesh', 'in'),
('IN-UT', 'Uttarakhand', 'in'),
('IN-WB', 'West Bengal', 'in')
-- INSERT INTO "worldTravelCountryRegions" (id, name, country_code)
-- VALUES
-- ('IN-AN', 'Andaman and Nicobar Islands', 'in'),
-- ('IN-AP', 'Andhra Pradesh', 'in'),
-- ('IN-AR', 'Arunachal Pradesh', 'in'),
-- ('IN-AS', 'Assam', 'in'),
-- ('IN-BR', 'Bihar', 'in'),
-- ('IN-CH', 'Chandigarh', 'in'),
-- ('IN-CT', 'Chhattisgarh', 'in'),
-- ('IN-DN', 'Dadra and Nagar Haveli and Daman and Diu', 'in'),
-- ('IN-DD', 'Daman and Diu', 'in'), -- These IDs are consolidated now, but adding separately for compatibility
-- ('IN-DL', 'Delhi', 'in'),
-- ('IN-GA', 'Goa', 'in'),
-- ('IN-GJ', 'Gujarat', 'in'),
-- ('IN-HR', 'Haryana', 'in'),
-- ('IN-HP', 'Himachal Pradesh', 'in'),
-- ('IN-JH', 'Jharkhand', 'in'),
-- ('IN-KA', 'Karnataka', 'in'),
-- ('IN-KL', 'Kerala', 'in'),
-- ('IN-LD', 'Lakshadweep', 'in'),
-- ('IN-MP', 'Madhya Pradesh', 'in'),
-- ('IN-MH', 'Maharashtra', 'in'),
-- ('IN-MN', 'Manipur', 'in'),
-- ('IN-ML', 'Meghalaya', 'in'),
-- ('IN-MZ', 'Mizoram', 'in'),
-- ('IN-NL', 'Nagaland', 'in'),
-- ('IN-OR', 'Odisha', 'in'),
-- ('IN-PY', 'Puducherry', 'in'),
-- ('IN-PB', 'Punjab', 'in'),
-- ('IN-RJ', 'Rajasthan', 'in'),
-- ('IN-SK', 'Sikkim', 'in'),
-- ('IN-TN', 'Tamil Nadu', 'in'),
-- ('IN-TG', 'Telangana', 'in'),
-- ('IN-TR', 'Tripura', 'in'),
-- ('IN-UP', 'Uttar Pradesh', 'in'),
-- ('IN-UT', 'Uttarakhand', 'in'),
-- ('IN-WB', 'West Bengal', 'in')
ON CONFLICT (id) DO NOTHING;
-- ON CONFLICT (id) DO NOTHING;