-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
John Tordoff
committed
Mar 24, 2022
1 parent
a995f30
commit 5c3e013
Showing
5 changed files
with
37 additions
and
23 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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), | ||
), | ||
] |