webfaction and repo.or.cz deployment done
[worddb.git] / migrations / 004_django_contrib_admin_models.py
blob5db322751e7ec2f882a789558d7b0b6061815ca6
1 from dmigrations.mysql import migrations as m
2 import datetime
3 migration = m.Migration(sql_up=["""
4 CREATE TABLE `django_admin_log` (
5 `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
6 `action_time` datetime NOT NULL,
7 `user_id` integer NOT NULL,
8 `content_type_id` integer NULL,
9 `object_id` longtext NULL,
10 `object_repr` varchar(200) NOT NULL,
11 `action_flag` smallint UNSIGNED NOT NULL,
12 `change_message` longtext NOT NULL
13 ) ENGINE=InnoDB DEFAULT CHARSET=utf8
15 """, """
16 -- The following references should be added but depend on non-existent tables:
17 """, """
18 -- ALTER TABLE `django_admin_log` ADD CONSTRAINT content_type_id_refs_id_288599e6 FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`);
19 """, """
20 -- ALTER TABLE `django_admin_log` ADD CONSTRAINT user_id_refs_id_c8665aa FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
21 """], sql_down=["""
22 DROP TABLE `django_admin_log`;
23 """])