Skip to content

Commit

Permalink
Merge pull request CenterForOpenScience#10476 from cslzchen/feature/e…
Browse files Browse the repository at this point in the history
…ng-4905-update-migration

[ENG-4905] Re-do and verify migration
  • Loading branch information
cslzchen authored Nov 2, 2023
2 parents 7dd305f + 1aaf7c5 commit e24b524
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 57 deletions.
27 changes: 17 additions & 10 deletions addons/boa/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2022-08-17 19:15
from __future__ import unicode_literals
# Generated by Django 3.2.17 on 2023-11-01 15:08

import addons.base.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields

import addons.base.models
import osf.models.base
import osf.utils.datetime_aware_jsonfield
import osf.utils.fields
Expand All @@ -15,39 +16,45 @@ class Migration(migrations.Migration):
initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('osf', '0016_auto_20230828_1810'),
]

operations = [
migrations.CreateModel(
name='NodeSettings',
name='UserSettings',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
('_id', models.CharField(db_index=True, default=osf.models.base.generate_object_id, max_length=24, unique=True)),
('is_deleted', models.BooleanField(default=False)),
('deleted', osf.utils.fields.NonNaiveDateTimeField(blank=True, null=True)),
('folder_id', models.TextField(blank=True, null=True)),
('oauth_grants', osf.utils.datetime_aware_jsonfield.DateTimeAwareJSONField(blank=True, default=dict, encoder=osf.utils.datetime_aware_jsonfield.DateTimeAwareJSONEncoder)),
('owner', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='addons_boa_user_settings', to=settings.AUTH_USER_MODEL)),
],
options={
'abstract': False,
},
bases=(models.Model, osf.models.base.QuerySetExplainMixin, addons.base.models.BaseStorageAddon),
bases=(models.Model, osf.models.base.QuerySetExplainMixin),
),
migrations.CreateModel(
name='UserSettings',
name='NodeSettings',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
('_id', models.CharField(db_index=True, default=osf.models.base.generate_object_id, max_length=24, unique=True)),
('is_deleted', models.BooleanField(default=False)),
('deleted', osf.utils.fields.NonNaiveDateTimeField(blank=True, null=True)),
('oauth_grants', osf.utils.datetime_aware_jsonfield.DateTimeAwareJSONField(blank=True, default=dict, encoder=osf.utils.datetime_aware_jsonfield.DateTimeAwareJSONEncoder)),
('folder_id', models.TextField(blank=True, null=True)),
('external_account', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='addons_boa_node_settings', to='osf.externalaccount')),
('owner', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='addons_boa_node_settings', to='osf.abstractnode')),
('user_settings', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='addons_boa.usersettings')),
],
options={
'abstract': False,
},
bases=(models.Model, osf.models.base.QuerySetExplainMixin),
bases=(models.Model, osf.models.base.QuerySetExplainMixin, addons.base.models.BaseStorageAddon),
),
]
47 changes: 0 additions & 47 deletions addons/boa/migrations/0002_auto_20220817_1915.py

This file was deleted.

0 comments on commit e24b524

Please sign in to comment.