add missing migrations + update ldt V02.17.03
authorymh <ymh.work@gmail.com>
Wed, 16 Sep 2015 22:16:20 +0200
changeset 278 b67c7dd6a949
parent 277 eec63f85b38d
child 279 813d8955b6a3
add missing migrations + update ldt
src/ldtplatform/__init__.py
src/ldtplatform/migrations/0001_correct_oauth_provider_secret_size.py
src/ldtplatform/migrations/0002_correct_oauth_provider_migration.py
src/requirement.txt
--- a/src/ldtplatform/__init__.py	Thu Sep 10 12:08:43 2015 +0200
+++ b/src/ldtplatform/__init__.py	Wed Sep 16 22:16:20 2015 +0200
@@ -1,4 +1,4 @@
-VERSION = (2, 17, 2, "final", 0)
+VERSION = (2, 17, 3, "final", 0)
 
 VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION[:2])))
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldtplatform/migrations/0001_correct_oauth_provider_secret_size.py	Wed Sep 16 22:16:20 2015 +0200
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+
+    def __init__(self, name, app_label):
+        super(Migration, self).__init__(name, app_label)
+        self.app_label = 'oauth_provider'
+
+    dependencies = [
+        ('oauth_provider', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='consumer',
+            name='secret',
+            field=models.CharField(max_length=32, blank=True),
+        ),
+        migrations.AlterField(
+            model_name='token',
+            name='secret',
+            field=models.CharField(max_length=32, null=True, blank=True),
+        ),
+    ]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ldtplatform/migrations/0002_correct_oauth_provider_migration.py	Wed Sep 16 22:16:20 2015 +0200
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('ldtplatform', '0001_correct_oauth_provider_secret_size')
+    ]
+
+    database_operations = [
+        migrations.RunSQL("ALTER TABLE oauth_provider_nonce ADD COLUMN \"timestamp\" integer DEFAULT 1375699511;", migrations.RunSQL.noop),
+        migrations.RunSQL("ALTER TABLE oauth_provider_nonce ADD CONSTRAINT oauth_provider_nonce_timestamp_check CHECK (\"timestamp\" >= 0);", migrations.RunSQL.noop),
+        migrations.RunSQL("ALTER TABLE oauth_provider_nonce ALTER COLUMN \"timestamp\" SET NOT NULL;", migrations.RunSQL.noop),
+        migrations.RunSQL("CREATE INDEX oauth_provider_nonce_d7e6d55b ON oauth_provider_nonce USING btree (\"timestamp\")", migrations.RunSQL.noop),
+        migrations.RunSQL("ALTER TABLE oauth_provider_resource RENAME TO oauth_provider_scope;", migrations.RunSQL.noop),
+        migrations.RunSQL("ALTER TABLE oauth_provider_token RENAME resource_id  TO scope_id;", migrations.RunSQL.noop),
+        migrations.RunSQL("ALTER TABLE oauth_provider_token ALTER COLUMN scope_id DROP NOT NULL;", migrations.RunSQL.noop),
+    ]
+
+    state_operations = [
+    ]
+
+    operations = [
+        migrations.SeparateDatabaseAndState(
+            database_operations=database_operations,
+            state_operations=state_operations)
+    ]
+    
+    
\ No newline at end of file
--- a/src/requirement.txt	Thu Sep 10 12:08:43 2015 +0200
+++ b/src/requirement.txt	Wed Sep 16 22:16:20 2015 +0200
@@ -1,3 +1,3 @@
-ldt (==1.59)
+ldt (==1.59.2)
 hashcut (==0.15)
 metadatacomposer (==0.1.22)