|
|
|
@ -12,7 +12,14 @@ links = [ |
|
|
|
|
|
|
|
|
|
# SQLite setup |
|
|
|
|
cur = con.cursor() |
|
|
|
|
cur.execute("CREATE TABLE links (url text, name text, clicks int, active int, position int)") |
|
|
|
|
cur.execute('''CREATE TABLE links ( |
|
|
|
|
url text NOT NULL, |
|
|
|
|
name text NOT NULL, |
|
|
|
|
clicks int NOT NULL, |
|
|
|
|
active int NOT NULL, |
|
|
|
|
position int NOT NULL UNIQUE, |
|
|
|
|
UNIQUE(url, name) |
|
|
|
|
)''') |
|
|
|
|
cur.executemany("INSERT INTO links VALUES (?,?,?,?,?)", links) |
|
|
|
|
con.commit() |
|
|
|
|
|
|
|
|
|