1 from dmigrations
.mysql
import migrations
as m
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
16 -- The following references should be added but depend on non-existent tables:
18 -- ALTER TABLE `django_admin_log` ADD CONSTRAINT content_type_id_refs_id_288599e6 FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`);
20 -- ALTER TABLE `django_admin_log` ADD CONSTRAINT user_id_refs_id_c8665aa FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
22 DROP TABLE `django_admin_log`;