webfaction and repo.or.cz deployment done
[worddb.git] / migrations / 009_django_authopenid_models.py
blob6bee1b4da3fa19e15eb27dad7a19bdc2ecfe1bb9
1 from dmigrations.mysql import migrations as m
2 import datetime
3 migration = m.Migration(sql_up=["""
4 CREATE TABLE `django_authopenid_nonce` (
5 `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
6 `server_url` varchar(255) NOT NULL,
7 `timestamp` integer NOT NULL,
8 `salt` varchar(40) NOT NULL
9 ) ENGINE=InnoDB DEFAULT CHARSET=utf8
11 """, """
12 CREATE TABLE `django_authopenid_association` (
13 `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
14 `server_url` longtext NOT NULL,
15 `handle` varchar(255) NOT NULL,
16 `secret` longtext NOT NULL,
17 `issued` integer NOT NULL,
18 `lifetime` integer NOT NULL,
19 `assoc_type` longtext NOT NULL
20 ) ENGINE=InnoDB DEFAULT CHARSET=utf8
22 """, """
23 CREATE TABLE `django_authopenid_userassociation` (
24 `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
25 `openid_url` varchar(255) NOT NULL,
26 `user_id` integer NOT NULL UNIQUE
27 ) ENGINE=InnoDB DEFAULT CHARSET=utf8
29 """, """
30 ALTER TABLE `django_authopenid_userassociation` ADD CONSTRAINT user_id_refs_id_163d208d FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
31 """, """
32 CREATE TABLE `django_authopenid_userpasswordqueue` (
33 `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
34 `user_id` integer NOT NULL UNIQUE,
35 `new_password` varchar(30) NOT NULL,
36 `confirm_key` varchar(40) NOT NULL
37 ) ENGINE=InnoDB DEFAULT CHARSET=utf8
39 """, """
40 ALTER TABLE `django_authopenid_userpasswordqueue` ADD CONSTRAINT user_id_refs_id_76bcaaa4 FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
41 """], sql_down=["""
42 DROP TABLE `django_authopenid_userpasswordqueue`;
43 """, """
44 DROP TABLE `django_authopenid_userassociation`;
45 """, """
46 DROP TABLE `django_authopenid_association`;
47 """, """
48 DROP TABLE `django_authopenid_nonce`;
49 """])