(create-migration name)
Creates a new migration in clsql.config/migrations-directory, identified by the provided name. Directories are created automatically, whenever needed.
Creates a new migration in clsql.config/migrations-directory, identified by the provided name. Directories are created automatically, whenever needed.
(migrate)
Applies all pending migrations into the configured database. Migrations are executed within a transaction, allowing the database to revert any changes in case of an exception
Applies all pending migrations into the configured database. Migrations are executed within a transaction, allowing the database to revert any changes in case of an exception
(migration-status)
Prints the statuses of all migrations. Up indicates the migration has been applied, down indicates it is pending. Question marks indicates the migration exists on the database, but a matching migration file could not be found.
Prints the statuses of all migrations. Up indicates the migration has been applied, down indicates it is pending. Question marks indicates the migration exists on the database, but a matching migration file could not be found.
(rollback & {:keys [to]})
Reverts one or more migrations. When :to is defined, reverts all migrations after the provided version. Otherwise, reverts the last migration.
Reverts one or more migrations. When :to is defined, reverts all migrations after the provided version. Otherwise, reverts the last migration.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close