18 lines
434 B
Python
18 lines
434 B
Python
from sqlalchemy import Column, Integer, String, Text, create_engine
|
|
from sqlalchemy.orm import declarative_base
|
|
|
|
Base = declarative_base()
|
|
|
|
|
|
class Prompt(Base):
|
|
__tablename__ = "prompts"
|
|
|
|
id = Column(Integer, primary_key=True)
|
|
name = Column(String, nullable=False)
|
|
text = Column(Text, nullable=False)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
engine = create_engine("sqlite:///example.db")
|
|
Base.metadata.create_all(engine)
|