Remove active column
This commit is contained in:
parent
98dacb78a3
commit
3035b138f9
|
@ -3,11 +3,11 @@ con = sqlite3.connect('links.db')
|
||||||
|
|
||||||
# array of links to store
|
# array of links to store
|
||||||
links = [
|
links = [
|
||||||
('http://csclub.uwaterloo.ca/','CS Club Website',3,1,0),
|
('http://csclub.uwaterloo.ca/','CS Club Website',3,0),
|
||||||
('https://www.instagram.com/uwcsclub/','Instagram',4,1,1),
|
('https://www.instagram.com/uwcsclub/','Instagram',4,1),
|
||||||
('https://www.facebook.com/uw.computerscienceclub','Facebook',5,0,2),
|
('https://www.facebook.com/uw.computerscienceclub','Facebook',5,2),
|
||||||
('http://twitch.tv/uwcsclub','Twitch',6,0,3),
|
('http://twitch.tv/uwcsclub','Twitch',6,3),
|
||||||
('http://bit.ly/uwcsclub-yt','YouTube',7,1,4),
|
('http://bit.ly/uwcsclub-yt','YouTube',7,4),
|
||||||
]
|
]
|
||||||
|
|
||||||
# SQLite setup
|
# SQLite setup
|
||||||
|
@ -22,11 +22,10 @@ else:
|
||||||
url text NOT NULL,
|
url text NOT NULL,
|
||||||
name text NOT NULL,
|
name text NOT NULL,
|
||||||
clicks int NOT NULL,
|
clicks int NOT NULL,
|
||||||
active int NOT NULL,
|
|
||||||
position int NOT NULL UNIQUE,
|
position int NOT NULL UNIQUE,
|
||||||
UNIQUE(url, name)
|
UNIQUE(url, name)
|
||||||
)''')
|
)''')
|
||||||
cur.executemany('INSERT INTO links VALUES (?,?,?,?,?)', links)
|
cur.executemany('INSERT INTO links VALUES (?,?,?,?)', links)
|
||||||
con.commit()
|
con.commit()
|
||||||
|
|
||||||
con.close()
|
con.close()
|
Loading…
Reference in New Issue