(col-idx table col)
Defines an index for a single column
Defines an index for a single column
(cuid-idx table)
Generates a unique index on the cuid
column for given table.
Generates a unique index on the `cuid` column for given table.
(fk col ref-table ref-col & [no-cascade?])
Defines a foreign key constraint on the column that references another table column.
Defines a foreign key constraint on the column that references another table column.
(format-migrations sql-opts)
(format-migrations migrations sql-opts)
Formats all migrations to sql, creates a ragtime migration object from it.
Formats all migrations to sql, creates a ragtime migration object from it.
(migration id up down)
Creates a new migration, with given id and up/down statements. The statements can either be raw strings, or honeysql statements which are then converted to sql.
Creates a new migration, with given id and up/down statements. The statements can either be raw strings, or honeysql statements which are then converted to sql.
(run-migrations! conn)
Runs SQL migrations on the database indicated by the connection
Runs SQL migrations on the database indicated by the connection
(with-migrations conn f)
Runs migrations, executes f
and then rolls back. Useful for testing.
Runs migrations, executes `f` and then rolls back. Useful for testing.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close