Answer the question
In order to leave comments, you need to log in
Is it possible to import a DB schema into a Django model?
There is a PostgreSQL schema code in the following form:
CREATE TABLE "messages" (
"id" uuid NOT NULL,
"text" TEXT NOT NULL,
"category_id" uuid NOT NULL,
"posted_at" TIME NOT NULL,
"author_id" uuid NOT NULL,
CONSTRAINT "messages_pk" PRIMARY KEY ("id")
) WITH (
OIDS=FALSE
);
...
...
Answer the question
In order to leave comments, you need to log in
Everything is described in the Django documentation:
https://docs.djangoproject.com/en/2.2/howto/legacy...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question