This commit is contained in:
Rich
2021-08-03 10:50:12 +01:00
parent 40814436e4
commit fb63f91239
4 changed files with 82 additions and 0 deletions

BIN
app.db

Binary file not shown.

View File

@@ -34,3 +34,12 @@ class Passwords(db.Model):
def __repr__(self):
return "<Passwords {}>".format(self.ssid)
class ConfigTable(db.Model):
id = db.Column(db.Integer, primary_key=True)
k = db.Column(db.String(100))
v = db.Column(db.String(1023))
def __repr__(self):
return "<Config {}:{}>".format(self.k, self.v)

View File

@@ -0,0 +1,40 @@
"""ConfigTable table
Revision ID: 15f6b5e717d0
Revises: e36dba9683b5
Create Date: 2021-08-03 10:48:07.949538
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '15f6b5e717d0'
down_revision = 'e36dba9683b5'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('config_table',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('k', sa.String(length=100), nullable=True),
sa.Column('v', sa.String(length=1023), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.drop_table('config')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('config',
sa.Column('id', sa.INTEGER(), nullable=False),
sa.Column('k', sa.VARCHAR(length=100), nullable=True),
sa.Column('v', sa.VARCHAR(length=1023), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.drop_table('config_table')
# ### end Alembic commands ###

View File

@@ -0,0 +1,33 @@
"""Config table
Revision ID: e36dba9683b5
Revises: cda874698f7d
Create Date: 2021-08-03 10:23:52.862784
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e36dba9683b5'
down_revision = 'cda874698f7d'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('config',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('k', sa.String(length=100), nullable=True),
sa.Column('v', sa.String(length=1023), nullable=True),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('config')
# ### end Alembic commands ###