2018-03-27 20:58:29 +02:00
|
|
|
import sqlite3
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
2019-01-21 21:55:50 +01:00
|
|
|
def do_migration(conf):
|
|
|
|
db_path = os.path.join(conf.data_dir, "lbrynet.sqlite")
|
2018-03-27 20:58:29 +02:00
|
|
|
connection = sqlite3.connect(db_path)
|
|
|
|
cursor = connection.cursor()
|
|
|
|
cursor.executescript("alter table blob add last_announced_time integer;")
|
2018-03-29 00:47:37 +02:00
|
|
|
cursor.executescript("alter table blob add single_announce integer;")
|
2018-03-27 20:58:29 +02:00
|
|
|
cursor.execute("update blob set next_announce_time=0")
|
|
|
|
connection.commit()
|
|
|
|
connection.close()
|