diff --git a/taiga/projects/history/migrations/0006_fix_json_field_not_null.py b/taiga/projects/history/migrations/0006_fix_json_field_not_null.py new file mode 100644 index 00000000..8c8ae187 --- /dev/null +++ b/taiga/projects/history/migrations/0006_fix_json_field_not_null.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django_pgjson.fields import JsonField + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('history', '0005_auto_20141120_1119'), + ] + + operations = [ + migrations.RunSQL( + sql='ALTER TABLE history_historyentry ALTER COLUMN "user" DROP NOT NULL;', + ), + migrations.RunSQL( + sql='ALTER TABLE history_historyentry ALTER COLUMN "diff" DROP NOT NULL;', + ), + migrations.RunSQL( + sql='ALTER TABLE history_historyentry ALTER COLUMN "snapshot" DROP NOT NULL;', + ), + migrations.RunSQL( + sql='ALTER TABLE history_historyentry ALTER COLUMN "values" DROP NOT NULL;', + ), + migrations.RunSQL( + sql='ALTER TABLE history_historyentry ALTER COLUMN "delete_comment_user" DROP NOT NULL;', + ), + ] diff --git a/taiga/projects/migrations/0016_fix_json_field_not_null.py b/taiga/projects/migrations/0016_fix_json_field_not_null.py new file mode 100644 index 00000000..aaa04543 --- /dev/null +++ b/taiga/projects/migrations/0016_fix_json_field_not_null.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django_pgjson.fields import JsonField + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('projects', '0015_auto_20141230_1212'), + ] + + operations = [ + migrations.RunSQL( + sql='ALTER TABLE projects_projectmodulesconfig ALTER COLUMN config DROP NOT NULL;', + ), + migrations.RunSQL( + sql='ALTER TABLE projects_projecttemplate ALTER COLUMN default_options DROP NOT NULL;', + ), + migrations.RunSQL( + sql='ALTER TABLE projects_projecttemplate ALTER COLUMN us_statuses DROP NOT NULL;', + ), + migrations.RunSQL( + sql='ALTER TABLE projects_projecttemplate ALTER COLUMN points DROP NOT NULL;', + ), + migrations.RunSQL( + sql='ALTER TABLE projects_projecttemplate ALTER COLUMN task_statuses DROP NOT NULL;', + ), + migrations.RunSQL( + sql='ALTER TABLE projects_projecttemplate ALTER COLUMN issue_statuses DROP NOT NULL;', + ), + migrations.RunSQL( + sql='ALTER TABLE projects_projecttemplate ALTER COLUMN issue_types DROP NOT NULL;', + ), + migrations.RunSQL( + sql='ALTER TABLE projects_projecttemplate ALTER COLUMN priorities DROP NOT NULL;', + ), + migrations.RunSQL( + sql='ALTER TABLE projects_projecttemplate ALTER COLUMN severities DROP NOT NULL;', + ), + migrations.RunSQL( + sql='ALTER TABLE projects_projecttemplate ALTER COLUMN roles DROP NOT NULL;', + ), + ] diff --git a/taiga/userstorage/migrations/0002_fix_json_field_not_null.py b/taiga/userstorage/migrations/0002_fix_json_field_not_null.py new file mode 100644 index 00000000..f993919a --- /dev/null +++ b/taiga/userstorage/migrations/0002_fix_json_field_not_null.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django_pgjson.fields import JsonField + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('userstorage', '0001_initial'), + ] + + operations = [ + migrations.RunSQL( + sql='ALTER TABLE userstorage_storageentry ALTER COLUMN value DROP NOT NULL;', + ), + ]