Permalink
Browse files

[bug 686160] Update schema.sql and clear out migrations.

Updated docs to remove note about migration 109.
  • Loading branch information...
1 parent e90fe2c commit ce788faa3f070e82f48e67babfd90e7ce6274171 @rlr rlr committed Jun 7, 2012
Showing with 1,278 additions and 1,341 deletions.
  1. +0 −9 docs/hacking_howto.rst
  2. +0 −2 migrations/100-dash-group-id-unique.sql
  3. +0 −77 migrations/101-document-delete-permissions.sql
  4. +0 −2 migrations/102-wiki-rebuild-on-demand-switch.sql
  5. +0 −6 migrations/103-wiki-archival.sql
  6. +0 −5 migrations/104-waffle-0.7.sql
  7. +0 −70 migrations/105-djcelery.sql
  8. +0 −4 migrations/106-solution-permission.sql
  9. +0 −13 migrations/107-drop-unconfirmed-questions.sql
  10. +0 −2 migrations/108-drop-question-status.sql
  11. +0 −6 migrations/109-user-profile-permissions.sql
  12. +0 −3 migrations/110-allow-discussion.sql
  13. +0 −11 migrations/111-ready-for-localization.sql
  14. +0 −28 migrations/112-group-profiles.sql
  15. +0 −9 migrations/113-document-contributors-m2m.sql
  16. +0 −3 migrations/114-user_registrationprofile-to-innodb-utf8.sql
  17. +0 −1 migrations/115-contributors-grou.sql
  18. +0 −21 migrations/116-helpful-doc-to-rev-id.sql
  19. +0 −4 migrations/117-cleanup-document-topics.sql
  20. +0 −12 migrations/118-questions-votes-metadata.sql
  21. +0 −4 migrations/119-karma-points-permission.sql
  22. +0 −7 migrations/120-importantdate-kb-metrics-graphs.sql
  23. +0 −9 migrations/121-importantdate-permissions.sql
  24. +0 −1 migrations/122-drop-helpfulvoteold.sql
  25. +0 −31 migrations/123-karma-titles.sql
  26. +0 −1 migrations/124-karma-auto-titles.sql
  27. +0 −7 migrations/125-desktop-tag-for-documents.py
  28. +0 −5 migrations/126-insignificants-cant-be-ready.sql
  29. +0 −2 migrations/127-drop-os-fx.sql
  30. +0 −1 migrations/128-index-user-isactive.sql
  31. +0 −10 migrations/129-helpfulvote-metadata.sql
  32. +0 −14 migrations/130-add-user-settings.sql
  33. +0 −5 migrations/131-alter-user-settings-innodb-utf8.sql
  34. +0 −5 migrations/132-document-needs-change.sql
  35. +0 −31 migrations/133-drop-lazarus-tables.sql
  36. +0 −4 migrations/134-karma-dash-perm.sql
  37. +0 −2 migrations/135-elasticsearch-waffle.sql
  38. +0 −14 migrations/136-upgrade-waffle.sql
  39. +0 −4 migrations/137-waffle-now.sql
  40. +0 −16 migrations/138-kpi-metrics.sql
  41. +0 −5 migrations/139-kpi-metric-kind-unique.sql
  42. +0 −3 migrations/140-drop-aoa-snippets.sql
  43. +0 −6 migrations/141-karma-points.sql
  44. +0 −9 migrations/142-kpi-metric-kinds-and-permissions.sql
  45. +0 −15 migrations/143-search-record-and-permission.sql
  46. +0 −22 migrations/144-aoa-reply-model.sql
  47. +0 −2 migrations/145-unique-visitor-metric-kind.sql
  48. +0 −2 migrations/146-l10n-coverage-metric-kind.sql
  49. +0 −2 migrations/84-drop-eventwatch.sql
  50. +0 −3 migrations/85-customercare-hidden.sql
  51. +0 −17 migrations/86-tweet-relationships.sql
  52. +0 −9 migrations/87-image-permissions.sql
  53. +0 −8 migrations/88-postcrash.sql
  54. +0 −19 migrations/89-add-activity.sql
  55. +0 −28 migrations/90-install-waffle.sql
  56. +0 −3 migrations/91-user-locale.sql
  57. +0 −29 migrations/92-activity-formatters.sql
  58. +0 −27 migrations/93-announcements.sql
  59. +0 −2 migrations/94-rename-to-tidings.sql
  60. +0 −18 migrations/95-group-dashboards.sql
  61. +0 −13 migrations/96-group-dashboard-fix.sql
  62. +0 −10 migrations/97-waffle-0.6.sql
  63. +0 −20 migrations/98-gallery-is-draft.sql
  64. +0 −35 migrations/99-private-messages.sql
  65. +1,278 −573 scripts/schema.sql
View
@@ -264,15 +264,6 @@ To load the latest database schema, use ``scripts/schema.sql`` and
$ mysql -u kitsune -p kitsune < scripts/schema.sql
$ ./vendor/src/schematic/schematic migrations/
-At this point you may run into an error related to a foreign key
-constraint within migration 109. To solve this issue::
-
- $ ./manage.py shell
- >>> from django.models.contenttypes import ContentType
- >>> from users.models import Profile
- >>> ContentType.object.get_from_model(Profile)
- $ ./vendor/src/schematic/schematic migrations/
-
You'll now have an empty but up-to-date database!
Finally, you'll probably want to create a superuser. Just use Django's
@@ -1,2 +0,0 @@
-ALTER TABLE dashboards_groupdashboard
- MODIFY `group_id` integer NOT NULL UNIQUE;
@@ -1,77 +0,0 @@
-SET @ct = (SELECT id from django_content_type WHERE name='document' AND app_label='wiki');
-
-INSERT INTO auth_permission (`name`, `content_type_id`, `codename`) VALUES
- ('Can delete ak locale documents', @ct, 'delete_document_ak'),
- ('Can delete ar locale documents', @ct, 'delete_document_ar'),
- ('Can delete as locale documents', @ct, 'delete_document_as'),
- ('Can delete ast locale documents', @ct, 'delete_document_ast'),
- ('Can delete bg locale documents', @ct, 'delete_document_bg'),
- ('Can delete bn-BD locale documents', @ct, 'delete_document_bn-BD'),
- ('Can delete bn-IN locale documents', @ct, 'delete_document_bn-IN'),
- ('Can delete bs locale documents', @ct, 'delete_document_bs'),
- ('Can delete ca locale documents', @ct, 'delete_document_ca'),
- ('Can delete cs locale documents', @ct, 'delete_document_cs'),
- ('Can delete da locale documents', @ct, 'delete_document_da'),
- ('Can delete de locale documents', @ct, 'delete_document_de'),
- ('Can delete el locale documents', @ct, 'delete_document_el'),
- ('Can delete en-US locale documents', @ct, 'delete_document_en-US'),
- ('Can delete eo locale documents', @ct, 'delete_document_eo'),
- ('Can delete es locale documents', @ct, 'delete_document_es'),
- ('Can delete et locale documents', @ct, 'delete_document_et'),
- ('Can delete eu locale documents', @ct, 'delete_document_eu'),
- ('Can delete fa locale documents', @ct, 'delete_document_fa'),
- ('Can delete fi locale documents', @ct, 'delete_document_fi'),
- ('Can delete fr locale documents', @ct, 'delete_document_fr'),
- ('Can delete fur locale documents', @ct, 'delete_document_fur'),
- ('Can delete fy-NL locale documents', @ct, 'delete_document_fy-NL'),
- ('Can delete ga-IE locale documents', @ct, 'delete_document_ga-IE'),
- ('Can delete gd locale documents', @ct, 'delete_document_gd'),
- ('Can delete gl locale documents', @ct, 'delete_document_gl'),
- ('Can delete gu-IN locale documents', @ct, 'delete_document_gu-IN'),
- ('Can delete he locale documents', @ct, 'delete_document_he'),
- ('Can delete hi-IN locale documents', @ct, 'delete_document_hi-IN'),
- ('Can delete hr locale documents', @ct, 'delete_document_hr'),
- ('Can delete hu locale documents', @ct, 'delete_document_hu'),
- ('Can delete hy-AM locale documents', @ct, 'delete_document_hy-AM'),
- ('Can delete id locale documents', @ct, 'delete_document_id'),
- ('Can delete ilo locale documents', @ct, 'delete_document_ilo'),
- ('Can delete is locale documents', @ct, 'delete_document_is'),
- ('Can delete it locale documents', @ct, 'delete_document_it'),
- ('Can delete ja locale documents', @ct, 'delete_document_ja'),
- ('Can delete kk locale documents', @ct, 'delete_document_kk'),
- ('Can delete kn locale documents', @ct, 'delete_document_kn'),
- ('Can delete ko locale documents', @ct, 'delete_document_ko'),
- ('Can delete lt locale documents', @ct, 'delete_document_lt'),
- ('Can delete mai locale documents', @ct, 'delete_document_mai'),
- ('Can delete mk locale documents', @ct, 'delete_document_mk'),
- ('Can delete mn locale documents', @ct, 'delete_document_mn'),
- ('Can delete mr locale documents', @ct, 'delete_document_mr'),
- ('Can delete ms locale documents', @ct, 'delete_document_ms'),
- ('Can delete my locale documents', @ct, 'delete_document_my'),
- ('Can delete nb-NO locale documents', @ct, 'delete_document_nb-NO'),
- ('Can delete nl locale documents', @ct, 'delete_document_nl'),
- ('Can delete no locale documents', @ct, 'delete_document_no'),
- ('Can delete oc locale documents', @ct, 'delete_document_oc'),
- ('Can delete pa-IN locale documents', @ct, 'delete_document_pa-IN'),
- ('Can delete pl locale documents', @ct, 'delete_document_pl'),
- ('Can delete pt-BR locale documents', @ct, 'delete_document_pt-BR'),
- ('Can delete pt-PT locale documents', @ct, 'delete_document_pt-PT'),
- ('Can delete rm locale documents', @ct, 'delete_document_rm'),
- ('Can delete ro locale documents', @ct, 'delete_document_ro'),
- ('Can delete ru locale documents', @ct, 'delete_document_ru'),
- ('Can delete rw locale documents', @ct, 'delete_document_rw'),
- ('Can delete si locale documents', @ct, 'delete_document_si'),
- ('Can delete sk locale documents', @ct, 'delete_document_sk'),
- ('Can delete sl locale documents', @ct, 'delete_document_sl'),
- ('Can delete sq locale documents', @ct, 'delete_document_sq'),
- ('Can delete sr-CYRL locale documents', @ct, 'delete_document_sr-CYRL'),
- ('Can delete sr-LATN locale documents', @ct, 'delete_document_sr-LATN'),
- ('Can delete sv-SE locale documents', @ct, 'delete_document_sv-SE'),
- ('Can delete ta-LK locale documents', @ct, 'delete_document_ta-LK'),
- ('Can delete te locale documents', @ct, 'delete_document_te'),
- ('Can delete th locale documents', @ct, 'delete_document_th'),
- ('Can delete tr locale documents', @ct, 'delete_document_tr'),
- ('Can delete uk locale documents', @ct, 'delete_document_uk'),
- ('Can delete vi locale documents', @ct, 'delete_document_vi'),
- ('Can delete zh-CN locale documents', @ct, 'delete_document_zh-CN'),
- ('Can delete zh-TW locale documents', @ct, 'delete_document_zh-TW');
@@ -1,2 +0,0 @@
-INSERT INTO waffle_switch (`name`, `active`) VALUES
- ('wiki-rebuild-on-demand', false);
@@ -1,6 +0,0 @@
--- Add is_archived flag to wiki documents:
-ALTER TABLE wiki_document ADD is_archived bool NOT NULL;
-CREATE INDEX `wiki_document_42e00a51` ON `wiki_document` (`is_archived`);
-
--- And a permission to control it:
-INSERT INTO auth_permission (name, content_type_id, codename) VALUES ('Can archive document', (SELECT id FROM django_content_type WHERE app_label='wiki' AND model='document'), 'archive_document');
@@ -1,5 +0,0 @@
--- Upgrade to Waffle 0.7.2
-
-ALTER TABLE `waffle_flag` ADD COLUMN `note` LONGTEXT NOT NULL;
-ALTER TABLE `waffle_sample` ADD COLUMN `note` LONGTEXT NOT NULL;
-ALTER TABLE `waffle_switch` ADD COLUMN `note` LONGTEXT NOT NULL;
@@ -1,70 +0,0 @@
-CREATE TABLE `djcelery_intervalschedule` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `every` integer NOT NULL,
- `period` varchar(24) NOT NULL
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
-;
-CREATE TABLE `djcelery_crontabschedule` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `minute` varchar(64) NOT NULL,
- `hour` varchar(64) NOT NULL,
- `day_of_week` varchar(64) NOT NULL
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
-;
-CREATE TABLE `djcelery_periodictasks` (
- `ident` smallint NOT NULL PRIMARY KEY,
- `last_update` datetime NOT NULL
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
-;
-CREATE TABLE `djcelery_periodictask` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `name` varchar(200) NOT NULL UNIQUE,
- `task` varchar(200) NOT NULL,
- `interval_id` integer,
- `crontab_id` integer,
- `args` longtext NOT NULL,
- `kwargs` longtext NOT NULL,
- `queue` varchar(200),
- `exchange` varchar(200),
- `routing_key` varchar(200),
- `expires` datetime,
- `enabled` bool NOT NULL,
- `last_run_at` datetime,
- `total_run_count` integer UNSIGNED NOT NULL,
- `date_changed` datetime NOT NULL
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
-;
-ALTER TABLE `djcelery_periodictask` ADD CONSTRAINT `crontab_id_refs_id_1400a18c` FOREIGN KEY (`crontab_id`) REFERENCES `djcelery_crontabschedule` (`id`);
-ALTER TABLE `djcelery_periodictask` ADD CONSTRAINT `interval_id_refs_id_dfabcb7` FOREIGN KEY (`interval_id`) REFERENCES `djcelery_intervalschedule` (`id`);
-CREATE TABLE `djcelery_workerstate` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `hostname` varchar(255) NOT NULL UNIQUE,
- `last_heartbeat` datetime
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
-;
-CREATE TABLE `djcelery_taskstate` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `state` varchar(64) NOT NULL,
- `task_id` varchar(36) NOT NULL UNIQUE,
- `name` varchar(200),
- `tstamp` datetime NOT NULL,
- `args` longtext,
- `kwargs` longtext,
- `eta` datetime,
- `expires` datetime,
- `result` longtext,
- `traceback` longtext,
- `runtime` double precision,
- `worker_id` integer,
- `hidden` bool NOT NULL
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
-;
-ALTER TABLE `djcelery_taskstate` ADD CONSTRAINT `worker_id_refs_id_4e3453a` FOREIGN KEY (`worker_id`) REFERENCES `djcelery_workerstate` (`id`);
-CREATE INDEX `djcelery_periodictask_17d2d99d` ON `djcelery_periodictask` (`interval_id`);
-CREATE INDEX `djcelery_periodictask_7aa5fda` ON `djcelery_periodictask` (`crontab_id`);
-CREATE INDEX `djcelery_workerstate_1475381c` ON `djcelery_workerstate` (`last_heartbeat`);
-CREATE INDEX `djcelery_taskstate_355bfc27` ON `djcelery_taskstate` (`state`);
-CREATE INDEX `djcelery_taskstate_52094d6e` ON `djcelery_taskstate` (`name`);
-CREATE INDEX `djcelery_taskstate_f459b00` ON `djcelery_taskstate` (`tstamp`);
-CREATE INDEX `djcelery_taskstate_20fc5b84` ON `djcelery_taskstate` (`worker_id`);
-CREATE INDEX `djcelery_taskstate_c91f1bf` ON `djcelery_taskstate` (`hidden`);
@@ -1,4 +0,0 @@
-SET @ct = (SELECT id from django_content_type WHERE name='question' AND app_label='questions');
-
-INSERT INTO auth_permission (`name`, `content_type_id`, `codename`) VALUES
- ('Can change/remove the solution to a question', @ct, 'change_solution');
@@ -1,13 +0,0 @@
--- At a minimum, this is the necessary clean up for old questions.
-
-DELETE FROM questions_questionmetadata WHERE question_id IN (SELECT id FROM questions_question WHERE status=0);
-
-DELETE FROM questions_questionvote WHERE question_id IN (SELECT id FROM questions_question WHERE status=0);
-
-UPDATE questions_question SET last_answer_id = NULL WHERE status = 0;
-
-DELETE FROM questions_answervote WHERE answer_id IN (SELECT id FROM questions_answer WHERE question_id IN (SELECT id FROM questions_question WHERE status = 0));
-
-DELETE FROM questions_answer WHERE question_id IN (SELECT id FROM questions_question WHERE status=0);
-
-DELETE FROM questions_question WHERE status = 0;
@@ -1,2 +0,0 @@
-ALTER TABLE questions_question DROP COLUMN status;
-ALTER TABLE questions_question DROP COLUMN confirmation_id;
@@ -1,6 +0,0 @@
-SET @ct = (SELECT id from django_content_type WHERE name='profile' AND app_label='users');
-
-INSERT INTO auth_permission (`name`, `content_type_id`, `codename`) VALUES
- ('Can add user profiles', @ct, 'add_profile'),
- ('Can change user profiles', @ct, 'change_profile'),
- ('Can delete user profiles', @ct, 'delete_profile');
@@ -1,3 +0,0 @@
--- Add an `allow_discussion` column to wiki_document.
-ALTER TABLE wiki_document
- ADD COLUMN allow_discussion TINYINT(1) NOT NULL DEFAULT 1;
@@ -1,11 +0,0 @@
-ALTER TABLE wiki_revision ADD COLUMN is_ready_for_localization boolean NOT NULL DEFAULT false;
--- Make all the old approved revs localizable, because that was the meaning before:
-UPDATE wiki_revision set is_ready_for_localization=true WHERE is_approved;
-
-ALTER TABLE wiki_document ADD COLUMN latest_localizable_revision_id int AFTER current_revision_id;
-ALTER TABLE wiki_document ADD CONSTRAINT latest_localizable_revision_id_refs_id_79f9a479 FOREIGN KEY (latest_localizable_revision_id) REFERENCES wiki_revision (id);
-UPDATE wiki_document SET latest_localizable_revision_id=current_revision_id;
-
-SET @ct = (SELECT id from django_content_type WHERE name='revision' AND app_label='wiki');
-INSERT INTO auth_permission (`name`, `content_type_id`, `codename`) VALUES
- ('Can mark revision as ready for localization', @ct, 'mark_ready_for_l10n');
@@ -1,28 +0,0 @@
-CREATE TABLE `groups_groupprofile_leaders` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `groupprofile_id` integer NOT NULL,
- `user_id` integer NOT NULL,
- UNIQUE (`groupprofile_id`, `user_id`)
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
-;
-ALTER TABLE `groups_groupprofile_leaders` ADD CONSTRAINT `user_id_refs_id_82107ee1` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
-CREATE TABLE `groups_groupprofile` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `slug` varchar(80) NOT NULL UNIQUE,
- `group_id` integer NOT NULL,
- `information` longtext NOT NULL,
- `information_html` longtext NOT NULL,
- `avatar` varchar(250)
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
-;
-ALTER TABLE `groups_groupprofile` ADD CONSTRAINT `group_id_refs_id_acfd2c6f` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`);
-ALTER TABLE `groups_groupprofile_leaders` ADD CONSTRAINT `groupprofile_id_refs_id_607797bc` FOREIGN KEY (`groupprofile_id`) REFERENCES `groups_groupprofile` (`id`);
-CREATE INDEX `groups_groupprofile_bda51c3c` ON `groups_groupprofile` (`group_id`);
-
-INSERT INTO django_content_type (`name`, `app_label`, `model`) VALUES
- ('group profile', 'groups', 'groupprofile');
-SET @ct = LAST_INSERT_ID();
-INSERT INTO auth_permission (`name`, `content_type_id`, `codename`) VALUES
- ('Can add group profile', @ct, 'add_groupprofile'),
- ('Can change group profile', @ct, 'change_groupprofile'),
- ('Can delete group profile', @ct, 'delete_groupprofile');
@@ -1,9 +0,0 @@
-CREATE TABLE `wiki_document_contributors` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `document_id` integer NOT NULL,
- `user_id` integer NOT NULL,
- UNIQUE (`document_id`, `user_id`)
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
-;
-ALTER TABLE `wiki_document_contributors` ADD CONSTRAINT `user_id_refs_id_12d875b` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
-ALTER TABLE `wiki_document_contributors` ADD CONSTRAINT `document_id_refs_id_a223b3cf` FOREIGN KEY (`document_id`) REFERENCES `wiki_document` (`id`);
@@ -1,3 +0,0 @@
-ALTER TABLE `users_registrationprofile` ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
-
-ALTER TABLE `users_registrationprofile` CHANGE `activation_key` `activation_key` VARCHAR(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
@@ -1 +0,0 @@
-INSERT INTO auth_group (`name`) VALUES ('Contributors');
@@ -1,21 +0,0 @@
-RENAME TABLE `wiki_helpfulvote` TO `wiki_helpfulvoteold`;
-
-CREATE TABLE `wiki_helpfulvote` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `revision_id` integer NOT NULL,
- `helpful` bool NOT NULL,
- `created` datetime NOT NULL,
- `creator_id` integer,
- `anonymous_id` varchar(40) NOT NULL,
- `user_agent` varchar(1000) NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
-ALTER TABLE `wiki_helpfulvote` ADD CONSTRAINT `creator_id_refs_id_4ec8a21b` FOREIGN KEY (`creator_id`) REFERENCES `auth_user` (`id`);
-ALTER TABLE `wiki_helpfulvote` ADD CONSTRAINT `revision_id_refs_id_a55647b` FOREIGN KEY (`revision_id`) REFERENCES `wiki_revision` (`id`);
-
-CREATE INDEX `wiki_helpfulvote_202bdc7f` ON `wiki_helpfulvote` (`revision_id`);
-CREATE INDEX `wiki_helpfulvote_3216ff68` ON `wiki_helpfulvote` (`created`);
-CREATE INDEX `wiki_helpfulvote_685aee7` ON `wiki_helpfulvote` (`creator_id`);
-CREATE INDEX `wiki_helpfulvote_2291b592` ON `wiki_helpfulvote` (`anonymous_id`);
-
-DELETE FROM `wiki_helpfulvoteold` WHERE document_id=7435;
@@ -1,4 +0,0 @@
-SET @ct = (SELECT id from django_content_type WHERE name='document' AND app_label='wiki');
-SET @tag = (SELECT id from taggit_tag WHERE name='mobile');
-
-DELETE FROM taggit_taggeditem WHERE tag_id != @tag AND content_type_id = @ct;
@@ -1,12 +0,0 @@
-CREATE TABLE `questions_votemetadata` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `content_type_id` integer,
- `object_id` integer UNSIGNED,
- `key` varchar(40) NOT NULL,
- `value` varchar(1000) NOT NULL
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
-;
-ALTER TABLE `questions_votemetadata` ADD CONSTRAINT `content_type_id_refs_id_f18225bf` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`);
-
-CREATE INDEX `questions_votemetadata_e4470c6e` ON `questions_votemetadata` (`content_type_id`);
-CREATE INDEX `questions_votemetadata_45544485` ON `questions_votemetadata` (`key`);
@@ -1,4 +0,0 @@
-SET @ct = (SELECT id from django_content_type WHERE name='profile' AND app_label='users');
-
-INSERT INTO auth_permission (`name`, `content_type_id`, `codename`) VALUES
- ('Can view karma points', @ct, 'view_karma_points');
@@ -1,7 +0,0 @@
-CREATE TABLE `wiki_importantdate` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `text` varchar(100) NOT NULL,
- `date` date NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
-CREATE INDEX `wiki_importantdate_679343db` ON `wiki_importantdate` (`date`);
@@ -1,9 +0,0 @@
-INSERT IGNORE INTO django_content_type (`name`, `app_label`, `model`) VALUES
- ('important date', 'wiki', 'importantdate');
-
-SET @ct = (SELECT id FROM django_content_type WHERE model='importantdate');
-
-INSERT INTO auth_permission (`name`, `content_type_id`, `codename`) VALUES
- ('Can add important dates', @ct, 'add_importantdate'),
- ('Can change important dates', @ct, 'change_importantdate'),
- ('Can delete important dates', @ct, 'delete_importantdate');
@@ -1 +0,0 @@
-DROP TABLE wiki_helpfulvoteold;
@@ -1,31 +0,0 @@
-CREATE TABLE `karma_title_users` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `title_id` integer NOT NULL,
- `user_id` integer NOT NULL,
- UNIQUE (`title_id`, `user_id`)
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
-;
-ALTER TABLE `karma_title_users` ADD CONSTRAINT `user_id_refs_id_83fda647` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
-CREATE TABLE `karma_title_groups` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `title_id` integer NOT NULL,
- `group_id` integer NOT NULL,
- UNIQUE (`title_id`, `group_id`)
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
-;
-ALTER TABLE `karma_title_groups` ADD CONSTRAINT `group_id_refs_id_b8eda48d` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`);
-CREATE TABLE `karma_title` (
- `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
- `name` varchar(100) NOT NULL UNIQUE
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
-;
-ALTER TABLE `karma_title_users` ADD CONSTRAINT `title_id_refs_id_898b376c` FOREIGN KEY (`title_id`) REFERENCES `karma_title` (`id`);
-ALTER TABLE `karma_title_groups` ADD CONSTRAINT `title_id_refs_id_2468f187` FOREIGN KEY (`title_id`) REFERENCES `karma_title` (`id`);
-
-INSERT INTO django_content_type (`name`, `app_label`, `model`) VALUES
- ('title', 'karma', 'title');
-SET @ct = LAST_INSERT_ID();
-INSERT INTO auth_permission (`name`, `content_type_id`, `codename`) VALUES
- ('Can add title', @ct, 'add_title'),
- ('Can change title', @ct, 'change_title'),
- ('Can delete title', @ct, 'delete_title');
@@ -1 +0,0 @@
-ALTER TABLE karma_title ADD is_auto bool NOT NULL;
@@ -1,7 +0,0 @@
-SET @ct = (SELECT id from django_content_type WHERE name='document' AND app_label='wiki');
-SET @tag = (SELECT id FROM taggit_tag WHERE name = 'desktop');
-
-INSERT IGNORE INTO taggit_taggeditem (tag_id, object_id, content_type_id)
- SELECT DISTINCT @tag, document_id, @ct FROM wiki_firefoxversion WHERE item_id IN (1,2,3,5,6,9)
- UNION
- SELECT DISTINCT @tag, document_id, @ct FROM wiki_operatingsystem WHERE item_id IN (1,2,3);
Oops, something went wrong.

0 comments on commit ce788fa

Please sign in to comment.