Преглед изворни кода

Set a proper index for the volunteer table.

tags/v0.1^2
Ben Kurtovic пре 12 година
родитељ
комит
ddd75c3c37
2 измењених фајлова са 4 додато и 2 уклоњено
  1. +1
    -1
      earwigbot/tasks/drn_clerkbot.py
  2. +3
    -1
      earwigbot/tasks/schema/drn_clerkbot.sql

+ 1
- 1
earwigbot/tasks/drn_clerkbot.py Прегледај датотеку

@@ -140,7 +140,7 @@ class DRNClerkBot(Task):
removals = set()
query1 = "SELECT volunteer_username FROM volunteer"
query2 = "DELETE FROM volunteer WHERE volunteer_username = ?"
query3 = "INSERT INTO volunteer VALUES (?)"
query3 = "INSERT INTO volunteer (volunteer_username) VALUES (?)"
with conn.cursor() as cursor:
cursor.execute(query1)
for row in cursor:


+ 3
- 1
earwigbot/tasks/schema/drn_clerkbot.sql Прегледај датотеку

@@ -50,8 +50,9 @@ CREATE TABLE `signature` (

DROP TABLE IF EXISTS `volunteer`;
CREATE TABLE `volunteer` (
`volunteer_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`volunteer_username` varchar(512) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`volunteer_username`)
PRIMARY KEY (`volunteer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- Dump completed on 2012-07-31 1:34:28

Loading…
Откажи
Сачувај