diff --git a/app/users/routes.py b/app/users/routes.py
index f2f8abf2..968806ac 100644
--- a/app/users/routes.py
+++ b/app/users/routes.py
@@ -15,7 +15,7 @@ def user(user_id):
backrefs = request.args.get('backrefs', 'false').lower() == 'true'
relationships = (
request.args.get('relationships', 'false').lower() == 'true')
- return user.to_json(backrefs=backrefs, relationships=relationships), 200
+ return user.to_json_serializeable(backrefs=backrefs, relationships=relationships), 200
@bp.route('/', methods=['DELETE'])
diff --git a/migrations/versions/260b57d5f4e7_.py b/migrations/versions/260b57d5f4e7_.py
index 8c9cfda6..d178ede8 100644
--- a/migrations/versions/260b57d5f4e7_.py
+++ b/migrations/versions/260b57d5f4e7_.py
@@ -21,6 +21,7 @@ def upgrade():
def downgrade():
- op.add_column('transkribus_htr_models',
+ op.add_column(
+ 'transkribus_htr_models',
sa.Column('transkribus_name', sa.String(length=64), autoincrement=False, nullable=True)
)
diff --git a/migrations/versions/31b9c0259e6b_.py b/migrations/versions/31b9c0259e6b_.py
new file mode 100644
index 00000000..aa6d78a9
--- /dev/null
+++ b/migrations/versions/31b9c0259e6b_.py
@@ -0,0 +1,51 @@
+"""Remove last_edited_date column from all tables
+
+Revision ID: 31b9c0259e6b
+Revises: 89e9526089bf
+Create Date: 2022-11-24 09:53:21.025531
+
+"""
+from alembic import op
+import sqlalchemy as sa
+
+# revision identifiers, used by Alembic.
+revision = '31b9c0259e6b'
+down_revision = '89e9526089bf'
+branch_labels = None
+depends_on = None
+
+
+def upgrade():
+ op.drop_column('corpora', 'last_edited_date')
+ op.drop_column('corpus_files', 'last_edited_date')
+ op.drop_column('job_inputs', 'last_edited_date')
+ op.drop_column('job_results', 'last_edited_date')
+ op.drop_column('spacy_nlp_pipeline_models', 'last_edited_date')
+ op.drop_column('tesseract_ocr_pipeline_models', 'last_edited_date')
+
+
+def downgrade():
+ op.add_column(
+ 'tesseract_ocr_pipeline_models',
+ sa.Column('last_edited_date', sa.DateTime(), nullable=True)
+ )
+ op.add_column(
+ 'spacy_nlp_pipeline_models',
+ sa.Column('last_edited_date', sa.DateTime(), nullable=True)
+ )
+ op.add_column(
+ 'job_results',
+ sa.Column('last_edited_date', sa.DateTime(), nullable=True)
+ )
+ op.add_column(
+ 'job_inputs',
+ sa.Column('last_edited_date', sa.DateTime(), nullable=True)
+ )
+ op.add_column(
+ 'corpus_files',
+ sa.Column('last_edited_date', sa.DateTime(), nullable=True)
+ )
+ op.add_column(
+ 'corpora',
+ sa.Column('last_edited_date', sa.DateTime(), nullable=True)
+ )
diff --git a/migrations/versions/63b2cc26a01f_.py b/migrations/versions/63b2cc26a01f_.py
index cd807282..8f33049f 100644
--- a/migrations/versions/63b2cc26a01f_.py
+++ b/migrations/versions/63b2cc26a01f_.py
@@ -5,7 +5,6 @@ Revises: 260b57d5f4e7
Create Date: 2022-10-11 14:32:13.227364
"""
-from genericpath import isdir
from alembic import op
import os
from app.models import User
diff --git a/migrations/versions/89e9526089bf_.py b/migrations/versions/89e9526089bf_.py
index 3abd65af..0d8bee9a 100644
--- a/migrations/versions/89e9526089bf_.py
+++ b/migrations/versions/89e9526089bf_.py
@@ -21,6 +21,7 @@ def upgrade():
def downgrade():
- op.add_column('users',
+ op.add_column(
+ 'users',
sa.Column('setting_dark_mode', sa.Boolean(), nullable=True)
)