I have been using Flask-SQLAlchemy with the help of this class:
class Test(db.Model):
__tablename__ = "test"
id = db.Column(db.Integer, primary_key=True, unique=True, nullable=False)
name = db.Column(db.String(127), nullable=False)
startDate = db.Column(db.Date, nullable=False)
The following SQL code generated on a PostgreSQL database:
CREATE TABLE IF NOT EXISTS public.test
(
id integer NOT NULL DEFAULT nextval('test_id_seq'::regclass),
name character varying(127) COLLATE pg_catalog."default" NOT NULL,
"startDate" date NOT NULL,
CONSTRAINT test_pkey PRIMARY KEY (id)
-- and so forth.......
But what I don't understand is: Why is startDate in quotes ?