fix database dump and model
This commit is contained in:
parent
b4b0b6d06c
commit
d7bde8f4d2
@ -39,7 +39,6 @@ SET default_tablespace = '';
|
||||
|
||||
SET default_table_access_method = heap;
|
||||
|
||||
|
||||
--
|
||||
-- Name: log; Type: TABLE; Schema: public; Owner: postgres
|
||||
--
|
||||
@ -50,7 +49,7 @@ CREATE TABLE public.log (
|
||||
datetime timestamp with time zone NOT NULL,
|
||||
action public.useractions NOT NULL,
|
||||
object_id integer,
|
||||
response smallint NOT NULL
|
||||
success_response boolean NOT NULL
|
||||
);
|
||||
|
||||
|
||||
@ -84,11 +83,11 @@ ALTER SEQUENCE public.log_id_seq OWNED BY public.log.id;
|
||||
|
||||
ALTER TABLE ONLY public.log ALTER COLUMN id SET DEFAULT nextval('public.log_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Data for Name: log; Type: TABLE DATA; Schema: public; Owner: postgres
|
||||
--
|
||||
|
||||
INSERT INTO public.log (id, user_id, datetime, action, object_id, response) VALUES (1, 2, '2025-03-13 18:34:34.443097+00', 'FIRST_ENTRY', NULL, 200);
|
||||
|
||||
|
||||
--
|
||||
|
@ -2,7 +2,7 @@ from enum import Enum
|
||||
|
||||
from datetime import datetime, timezone
|
||||
|
||||
from sqlalchemy import SMALLINT, INTEGER, TIMESTAMP
|
||||
from sqlalchemy import INTEGER, TIMESTAMP
|
||||
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
|
||||
|
||||
def utc_signed_now():
|
||||
@ -31,4 +31,4 @@ class Log(Base):
|
||||
)
|
||||
action: Mapped[UserActions]
|
||||
object_id: Mapped[int] = mapped_column(nullable=True)
|
||||
response: Mapped[int] = mapped_column(SMALLINT)
|
||||
success_response: Mapped[bool]
|
||||
|
Loading…
x
Reference in New Issue
Block a user