mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-09 23:36:02 +00:00
feat: database migration
This commit is contained in:
19
pkg/entity/persistence/metadata.py
Normal file
19
pkg/entity/persistence/metadata.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import sqlalchemy
|
||||
|
||||
from .base import Base
|
||||
|
||||
|
||||
initial_metadata = [
|
||||
{
|
||||
'key': 'database_version',
|
||||
'value': '0',
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
class Metadata(Base):
|
||||
"""数据库元数据"""
|
||||
__tablename__ = 'metadata'
|
||||
|
||||
key = sqlalchemy.Column(sqlalchemy.String(255), primary_key=True)
|
||||
value = sqlalchemy.Column(sqlalchemy.String(255))
|
||||
Reference in New Issue
Block a user