Skip to content

Commit

Permalink
delete qfn model
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tordoff committed Mar 24, 2022
1 parent a995f30 commit 5c3e013
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 23 deletions.
20 changes: 0 additions & 20 deletions osf/migrations/0053_add_quickfiles.py

This file was deleted.

2 changes: 1 addition & 1 deletion osf/migrations/0054_auto_20170823_1555.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='abstractnode',
name='type',
field=models.CharField(choices=[('osf.node', 'node'), ('osf.collection', 'collection'), ('osf.registration', 'registration'), ('osf.quickfilesnode', 'quick files node')], db_index=True, max_length=255),
field=models.CharField(choices=[('osf.node', 'node'), ('osf.collection', 'collection'), ('osf.registration', 'registration')], db_index=True, max_length=255),
),
]
2 changes: 1 addition & 1 deletion osf/migrations/0088_post_migrate_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='abstractnode',
name='type',
field=models.CharField(choices=[('osf.node', 'node'), ('osf.registration', 'registration'), ('osf.quickfilesnode', 'quick files node')], db_index=True, max_length=255),
field=models.CharField(choices=[('osf.node', 'node'), ('osf.registration', 'registration')], db_index=True, max_length=255),
),
]
2 changes: 1 addition & 1 deletion osf/migrations/0198_draft_node_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='abstractnode',
name='type',
field=models.CharField(choices=[('osf.node', 'node'), ('osf.draftnode', 'draft node'), ('osf.registration', 'registration'), ('osf.quickfilesnode', 'quick files node')], db_index=True, max_length=255),
field=models.CharField(choices=[('osf.node', 'node'), ('osf.draftnode', 'draft node'), ('osf.registration', 'registration')], db_index=True, max_length=255),
),
migrations.AlterField(
model_name='draftregistration',
Expand Down
34 changes: 34 additions & 0 deletions osf/migrations/0243_auto_20220324_1105.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2022-03-24 11:05
from __future__ import unicode_literals

from django.db import migrations, models
from django.db.utils import ProgrammingError


def remove_if_exist(apps, schema_editor):
try:
schema_editor.execute(
schema_editor.sql_delete_table % {
'table': schema_editor.quote_name('quickfilesnode')
}
)
except (KeyError, ProgrammingError):
## No quickfilesnode to delete all good
pass


class Migration(migrations.Migration):

dependencies = [
('osf', '0242_auto_20220125_1604'),
]

operations = [
migrations.RunPython(remove_if_exist, migrations.RunPython.noop),
migrations.AlterField(
model_name='abstractnode',
name='type',
field=models.CharField(choices=[('osf.node', 'node'), ('osf.draftnode', 'draft node'), ('osf.registration', 'registration')], db_index=True, max_length=255),
),
]

0 comments on commit 5c3e013

Please sign in to comment.