Skip to content

Commit

Permalink
Update migrate_to_sqlite.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sakan811 authored Jun 16, 2024
1 parent 6a0019a commit f0d609c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions japan_avg_hotel_price_finder/migrate_to_sqlite.py
Original file line number Diff line number Diff line change
@@ -35,8 +35,6 @@ def migrate_data_to_sqlite(df_filtered: pd.DataFrame, details: Details) -> None:

db = details.sqlite_name
with sqlite3.connect(db) as con:
con.execute("PRAGMA journal_mode=WAL")

query = '''
CREATE TABLE IF NOT EXISTS HotelPrice (
ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
@@ -87,7 +85,6 @@ def create_average_room_price_by_date_view(db: str) -> None:
:return: None
"""
with sqlite3.connect(db) as con:
con.execute("PRAGMA journal_mode=WAL")
query = '''
CREATE VIEW IF NOT EXISTS AverageRoomPriceByDate AS
select Date, avg(Price) as AveragePrice, City

0 comments on commit f0d609c

Please sign in to comment.