From 3920183e0c124845a49495d25688bb1ca4b87f78 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Sat, 12 Jun 2021 12:07:51 +0200 Subject: [PATCH] add address.name kompetenzinventar/ki-doku#8 --- ki/models.py | 1 + ...tial_migration.py => 47ba0a9cf065_initial_migration.py} | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) rename migrations/versions/{3dfe40b821a5_initial_migration.py => 47ba0a9cf065_initial_migration.py} (96%) diff --git a/ki/models.py b/ki/models.py index fec1b46..9333426 100644 --- a/ki/models.py +++ b/ki/models.py @@ -57,6 +57,7 @@ class Address(db.Model): __tablename__ = "address" id = Column(Integer, primary_key=True) + name = Column(String(25), default="") street = Column(String(25), default="") house_number = Column(String(10), default="") additional = Column(String(25), default="") diff --git a/migrations/versions/3dfe40b821a5_initial_migration.py b/migrations/versions/47ba0a9cf065_initial_migration.py similarity index 96% rename from migrations/versions/3dfe40b821a5_initial_migration.py rename to migrations/versions/47ba0a9cf065_initial_migration.py index acc287a..5f9d7c8 100644 --- a/migrations/versions/3dfe40b821a5_initial_migration.py +++ b/migrations/versions/47ba0a9cf065_initial_migration.py @@ -1,8 +1,8 @@ """Initial migration -Revision ID: 3dfe40b821a5 +Revision ID: 47ba0a9cf065 Revises: -Create Date: 2021-06-12 11:58:43.577221 +Create Date: 2021-06-12 12:06:29.946450 """ from alembic import op @@ -10,7 +10,7 @@ import sqlalchemy as sa # revision identifiers, used by Alembic. -revision = '3dfe40b821a5' +revision = '47ba0a9cf065' down_revision = None branch_labels = None depends_on = None @@ -48,6 +48,7 @@ def upgrade(): ) op.create_table('address', sa.Column('id', sa.Integer(), nullable=False), + sa.Column('name', sa.String(length=25), nullable=True), sa.Column('street', sa.String(length=25), nullable=True), sa.Column('house_number', sa.String(length=10), nullable=True), sa.Column('additional', sa.String(length=25), nullable=True),