-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase_config.py
More file actions
43 lines (30 loc) · 908 Bytes
/
database_config.py
File metadata and controls
43 lines (30 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import sqlite3
#Створоення і очищення таблиці з назвою routes
truth = True
database = sqlite3.connect('logistics.db') # Start
logistics_db = database.cursor()
if truth:
# logistics_db.execute("DROP TABLE routes")
logistics_db.execute("""CREATE TABLE routes (
route_id integer,
id_start_station integer,
title_start_station text,
lat_start_station real,
lon_start_station real,
id_end_station integer,
title_end_station text,
lat_end_station real,
lon_end_station real,
length_in_km real,
travel_time_sec real,
departure_time text,
arrival_time text,
all_points_id integer,
all_pessenger_id integer,
transport_type text,
number_passengers integer,
full_weight real,
driver_name text
)""")
database.commit() # End
database.close()