Improve G Adventures transport import details and location mapping
All checks were successful
Build and Push Image / docker-build-and-push (push) Successful in 2m23s
All checks were successful
Build and Push Image / docker-build-and-push (push) Successful in 2m23s
This commit is contained in:
@@ -277,10 +277,19 @@ export function runMigrations(db: Database): void {
|
||||
end_date TEXT,
|
||||
end_time TEXT,
|
||||
end_timezone TEXT,
|
||||
start_location TEXT,
|
||||
end_location TEXT,
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
)
|
||||
`);
|
||||
for (const col of ['start_location TEXT', 'end_location TEXT']) {
|
||||
try {
|
||||
db.run(`ALTER TABLE other_transports ADD COLUMN ${col}`);
|
||||
} catch {
|
||||
/* already exists */
|
||||
}
|
||||
}
|
||||
|
||||
// Activity / restaurant details - links to a plan
|
||||
db.run(`
|
||||
@@ -490,6 +499,8 @@ export function runMigrations(db: Database): void {
|
||||
end_date TEXT,
|
||||
end_time TEXT,
|
||||
end_timezone TEXT,
|
||||
start_location TEXT,
|
||||
end_location TEXT,
|
||||
booking_id TEXT,
|
||||
total_cost REAL,
|
||||
description TEXT,
|
||||
@@ -503,12 +514,14 @@ export function runMigrations(db: Database): void {
|
||||
INSERT INTO operator_tour_day_plans__new (
|
||||
id, operator_tour_day_id, type, title, notes, position, created_at, updated_at,
|
||||
chain, address_line1, address_line2, city_name, country, country_code, postal_code,
|
||||
transport_kind, start_date, start_time, start_timezone, end_date, end_time, end_timezone
|
||||
transport_kind, start_date, start_time, start_timezone, end_date, end_time, end_timezone,
|
||||
start_location, end_location
|
||||
)
|
||||
SELECT
|
||||
id, operator_tour_day_id, type, title, notes, position, created_at, updated_at,
|
||||
chain, address_line1, address_line2, city_name, country, country_code, postal_code,
|
||||
transport_kind, start_date, start_time, start_timezone, end_date, end_time, end_timezone
|
||||
transport_kind, start_date, start_time, start_timezone, end_date, end_time, end_timezone,
|
||||
NULL as start_location, NULL as end_location
|
||||
FROM operator_tour_day_plans
|
||||
`);
|
||||
db.run('DROP TABLE operator_tour_day_plans');
|
||||
@@ -534,6 +547,8 @@ export function runMigrations(db: Database): void {
|
||||
'end_date TEXT',
|
||||
'end_time TEXT',
|
||||
'end_timezone TEXT',
|
||||
'start_location TEXT',
|
||||
'end_location TEXT',
|
||||
'booking_id TEXT',
|
||||
'total_cost REAL',
|
||||
'description TEXT',
|
||||
|
||||
Reference in New Issue
Block a user