-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These columns have been there from the initial model definition but have not been used at all. The adaptation of the import export format will be taken care of in another commit, that takes all the changes since v0.3 into account in one go.
- Loading branch information
Showing
18 changed files
with
93 additions
and
182 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
aiida/backends/djsite/db/migrations/0034_drop_node_columns_nodeversion_public.py
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,44 @@ | ||
# -*- coding: utf-8 -*- | ||
########################################################################### | ||
# Copyright (c), The AiiDA team. All rights reserved. # | ||
# This file is part of the AiiDA code. # | ||
# # | ||
# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core # | ||
# For further information on the license, see the LICENSE.txt file # | ||
# For further information please visit http://www.aiida.net # | ||
########################################################################### | ||
# pylint: disable=invalid-name,too-few-public-methods | ||
"""Drop the columns `nodeversion` and `public` from the `DbNode` model.""" | ||
from __future__ import division | ||
from __future__ import print_function | ||
from __future__ import unicode_literals | ||
from __future__ import absolute_import | ||
|
||
# Remove when https://github.com/PyCQA/pylint/issues/1931 is fixed | ||
# pylint: disable=no-name-in-module,import-error,no-member | ||
from django.db import migrations | ||
|
||
from aiida.backends.djsite.db.migrations import upgrade_schema_version | ||
|
||
REVISION = '1.0.34' | ||
DOWN_REVISION = '1.0.33' | ||
|
||
|
||
class Migration(migrations.Migration): | ||
"""Drop the columns `nodeversion` and `public` from the `DbNode` model.""" | ||
|
||
dependencies = [ | ||
('db', '0033_replace_text_field_with_json_field'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='dbnode', | ||
name='nodeversion', | ||
), | ||
migrations.RemoveField( | ||
model_name='dbnode', | ||
name='public', | ||
), | ||
upgrade_schema_version(REVISION, DOWN_REVISION) | ||
] |
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
31 changes: 31 additions & 0 deletions
31
...kends/sqlalchemy/migrations/versions/1830c8430131_drop_node_columns_nodeversion_public.py
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,31 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Drop the columns `nodeversion` and `public` from the `DbNode` model. | ||
Revision ID: 1830c8430131 | ||
Revises: 1b8ed3425af9 | ||
Create Date: 2019-05-27 15:35:37.404644 | ||
""" | ||
# pylint: disable=invalid-name,no-member,import-error,no-name-in-module | ||
from __future__ import division | ||
from __future__ import print_function | ||
from __future__ import absolute_import | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '1830c8430131' | ||
down_revision = '1b8ed3425af9' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.drop_column('db_dbnode', 'nodeversion') | ||
op.drop_column('db_dbnode', 'public') | ||
|
||
|
||
def downgrade(): | ||
op.add_column('db_dbnode', sa.Column('public', sa.BOOLEAN(), autoincrement=False, nullable=True)) | ||
op.add_column('db_dbnode', sa.Column('nodeversion', sa.INTEGER(), autoincrement=False, nullable=True)) |
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
Binary file modified
BIN
-664 Bytes
(94%)
aiida/backends/tests/fixtures/calcjob/arithmetic.add_old.aiida
Binary file not shown.
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
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
Oops, something went wrong.