2018-05-08 19:51:02 +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-05-08 19:51:02 +02:00
|
|
|
connection = sqlite3.connect(db_path)
|
|
|
|
cursor = connection.cursor()
|
|
|
|
|
|
|
|
cursor.executescript(
|
|
|
|
"""
|
|
|
|
create table reflected_stream (
|
|
|
|
sd_hash text not null,
|
|
|
|
reflector_address text not null,
|
|
|
|
timestamp integer,
|
|
|
|
primary key (sd_hash, reflector_address)
|
|
|
|
);
|
|
|
|
"""
|
|
|
|
)
|
|
|
|
connection.commit()
|
|
|
|
connection.close()
|