.
This commit is contained in:
@@ -34,3 +34,12 @@ class Passwords(db.Model):
|
|||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<Passwords {}>".format(self.ssid)
|
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)
|
||||||
|
|||||||
40
migrations/versions/15f6b5e717d0_configtable_table.py
Normal file
40
migrations/versions/15f6b5e717d0_configtable_table.py
Normal 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 ###
|
||||||
33
migrations/versions/e36dba9683b5_config_table.py
Normal file
33
migrations/versions/e36dba9683b5_config_table.py
Normal 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 ###
|
||||||
Reference in New Issue
Block a user