diff --git a/zds/tutorialv2/migrations/0032_shareablelink.py b/zds/tutorialv2/migrations/0032_shareablelink.py deleted file mode 100644 index 806616d924..0000000000 --- a/zds/tutorialv2/migrations/0032_shareablelink.py +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by Django 2.2.24 on 2021-06-10 00:54 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ("tutorialv2", "0031_source_is_url"), - ] - - operations = [ - migrations.CreateModel( - name="ShareableLink", - fields=[ - ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), - ( - "content", - models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - to="tutorialv2.PublishableContent", - verbose_name="Contenu", - ), - ), - ], - ), - ] diff --git a/zds/tutorialv2/migrations/0033_shareablelink_revoked.py b/zds/tutorialv2/migrations/0033_shareablelink_revoked.py deleted file mode 100644 index f70a8ae6f7..0000000000 --- a/zds/tutorialv2/migrations/0033_shareablelink_revoked.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.24 on 2021-06-10 12:59 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ("tutorialv2", "0032_shareablelink"), - ] - - operations = [ - migrations.AddField( - model_name="shareablelink", - name="revoked", - field=models.BooleanField(default=False), - ), - ] diff --git a/zds/tutorialv2/migrations/0034_auto_20210610_1527.py b/zds/tutorialv2/migrations/0034_auto_20210610_1527.py deleted file mode 100644 index 2831bcc3ea..0000000000 --- a/zds/tutorialv2/migrations/0034_auto_20210610_1527.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 2.2.24 on 2021-06-10 15:27 - -from django.db import migrations, models -import uuid - - -class Migration(migrations.Migration): - - dependencies = [ - ("tutorialv2", "0033_shareablelink_revoked"), - ] - - operations = [ - migrations.AddField( - model_name="shareablelink", - name="type", - field=models.CharField(choices=[("DRAFT", "Draft"), ("BETA", "Bêta")], default="DRAFT", max_length=10), - ), - migrations.AlterField( - model_name="shareablelink", - name="id", - field=models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False), - ), - ] diff --git a/zds/tutorialv2/migrations/0035_shareablelink_expiration.py b/zds/tutorialv2/migrations/0035_shareablelink_expiration.py deleted file mode 100644 index df899fbece..0000000000 --- a/zds/tutorialv2/migrations/0035_shareablelink_expiration.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.24 on 2021-06-10 22:42 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ("tutorialv2", "0034_auto_20210610_1527"), - ] - - operations = [ - migrations.AddField( - model_name="shareablelink", - name="expiration", - field=models.DateTimeField(null=True), - ), - ] diff --git a/zds/tutorialv2/migrations/0036_shareablelink.py b/zds/tutorialv2/migrations/0036_shareablelink.py new file mode 100644 index 0000000000..193f9500ce --- /dev/null +++ b/zds/tutorialv2/migrations/0036_shareablelink.py @@ -0,0 +1,40 @@ +# Generated by Django 3.2.15 on 2022-09-29 22:07 + +from django.db import migrations, models +import django.db.models.deletion +import uuid + + +class Migration(migrations.Migration): + + dependencies = [ + ("tutorialv2", "0035_alter_publishablecontent_goals"), + ] + + operations = [ + migrations.CreateModel( + name="ShareableLink", + fields=[ + ("id", models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ("active", models.BooleanField(default=True)), + ("expiration", models.DateTimeField(null=True)), + ("description", models.CharField(default="Lien de partage", max_length=150)), + ( + "type", + models.CharField( + choices=[("DRAFT", "Lien vers le dernier brouillon"), ("BETA", "Lien vers la dernière bêta")], + default="DRAFT", + max_length=10, + ), + ), + ( + "content", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + to="tutorialv2.publishablecontent", + verbose_name="Contenu", + ), + ), + ], + ), + ] diff --git a/zds/tutorialv2/migrations/0036_shareablelink_name.py b/zds/tutorialv2/migrations/0036_shareablelink_name.py deleted file mode 100644 index 32f5753604..0000000000 --- a/zds/tutorialv2/migrations/0036_shareablelink_name.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.24 on 2021-06-11 08:06 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ("tutorialv2", "0035_shareablelink_expiration"), - ] - - operations = [ - migrations.AddField( - model_name="shareablelink", - name="name", - field=models.CharField(default="Lien de partage", max_length=150), - ), - ] diff --git a/zds/tutorialv2/migrations/0037_auto_20210611_2230.py b/zds/tutorialv2/migrations/0037_auto_20210611_2230.py deleted file mode 100644 index 10c4182f6d..0000000000 --- a/zds/tutorialv2/migrations/0037_auto_20210611_2230.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.24 on 2021-06-11 22:30 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ("tutorialv2", "0036_shareablelink_name"), - ] - - operations = [ - migrations.RenameField( - model_name="shareablelink", - old_name="name", - new_name="description", - ), - ] diff --git a/zds/tutorialv2/migrations/0038_auto_20210612_1235.py b/zds/tutorialv2/migrations/0038_auto_20210612_1235.py deleted file mode 100644 index 114d643d0a..0000000000 --- a/zds/tutorialv2/migrations/0038_auto_20210612_1235.py +++ /dev/null @@ -1,31 +0,0 @@ -# Generated by Django 2.2.24 on 2021-06-12 12:35 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ("tutorialv2", "0037_auto_20210611_2230"), - ] - - operations = [ - migrations.RemoveField( - model_name="shareablelink", - name="revoked", - ), - migrations.AddField( - model_name="shareablelink", - name="active", - field=models.BooleanField(default=True), - ), - migrations.AlterField( - model_name="shareablelink", - name="type", - field=models.CharField( - choices=[("DRAFT", "Lien vers le dernier brouillon"), ("BETA", "Lien vers la dernière bêta")], - default="DRAFT", - max_length=10, - ), - ), - ]