Is there any additional documentation or info sources on the migrations functionality in the RDS module, specifically around Postgresql?
I have a couple of questions
-
Is there any way to enable extensions on the newly created database e.g.
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
to enable UUID functions in the database? -
Assuming 1) above, what is the syntax to use it in a column definition e.g.
.addColumn("width", "uuid")
? -
How do you create composite (multi-field) unique constraints? I know we can use
(col) => col.primaryKey()
as part of table creation. Does using that call on multiple columns create a multi-field constraint? Would that be a unique constraint? -
How do you specify a default column value? I know we can use
.addColumn("width", "integer", (col) => col.notNull())
to specify not null, is there a similar call to specify default? If so, can it then be used with aDEFAULT uuid_generate_v4()
definition to auto-populate uuids?
Cheers all!
Shaun