add fix
This commit is contained in:
parent
136f2a752a
commit
00629072be
@ -33,5 +33,6 @@ CREATE TABLE tg_messages (
|
||||
CREATE TABLE prompts (
|
||||
id SERIAL PRIMARY KEY ,
|
||||
prompt TEXT NOT NULL,
|
||||
role TEXT NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW() NOT NULL
|
||||
)
|
||||
|
@ -12,11 +12,13 @@ class PromptAdmin(ModelView, model=Prompt):
|
||||
|
||||
column_list = [
|
||||
Prompt.prompt,
|
||||
Prompt.created_at
|
||||
Prompt.created_at,
|
||||
Prompt.role,
|
||||
]
|
||||
|
||||
column_searchable_list = [
|
||||
Prompt.prompt
|
||||
Prompt.prompt,
|
||||
Prompt.role,
|
||||
]
|
||||
|
||||
column_sortable_list = [
|
||||
|
@ -12,6 +12,7 @@ class Prompt(Base):
|
||||
primary_key=True,
|
||||
autoincrement=True,
|
||||
)
|
||||
role: Mapped[str]
|
||||
prompt: Mapped[str]
|
||||
created_at: Mapped[datetime] = mapped_column(
|
||||
default=datetime.utcnow,
|
||||
|
Loading…
x
Reference in New Issue
Block a user