db:reset: drop what the application owns, then migrate.
What the application owns: every migration's objects, through the down
migrations; the tables libraries create at boot, as each declares in
wagoe/boot-tables/<lib>.edn; schema_migrations; and the schema of each
tenant in the tenants table. Nothing else in the database is touched, and
when anything else depends on what would go, nothing is dropped (BOU-585).
`db:reset`: drop what the application owns, then migrate. What the application owns: every migration's objects, through the down migrations; the tables libraries create at boot, as each declares in `wagoe/boot-tables/<lib>.edn`; `schema_migrations`; and the schema of each tenant in the `tenants` table. Nothing else in the database is touched, and when anything else depends on what would go, nothing is dropped (BOU-585).
(boot-tables)The tables libraries create at boot, outside any migration.
The tables libraries create at boot, outside any migration.
(execute! {:keys [config product tables tenant-schemas]})Carry out plan: roll every migration back, drop the tenant schemas, the
boot tables and schema_migrations, then migrate. A failure names the steps
that finished and how to recover.
Carry out `plan`: roll every migration back, drop the tenant schemas, the boot tables and schema_migrations, then migrate. A failure names the steps that finished and how to recover.
(loopback? host)Whether host is this machine. nil is a file or in-memory database.
Whether `host` is this machine. nil is a file or in-memory database.
(plan {:keys [allow-remote?]})What a reset of the active database would drop. Throws :forbidden outside
dev, test and acc, or on another machine without allow-remote?, and
:conflict when something the reset does not own depends on what it would
drop — before anything is dropped.
What a reset of the active database would drop. Throws :forbidden outside dev, test and acc, or on another machine without `allow-remote?`, and :conflict when something the reset does not own depends on what it would drop — before anything is dropped.
(reset-database!)(reset-database! opts)Plan and carry out a reset without asking. The CLI shows the plan and asks first; this is for code that already has.
Plan and carry out a reset without asking. The CLI shows the plan and asks first; this is for code that already has.
(slug->schema-name slug)A tenant's schema. Mirrors wagoe.tenant.core.tenant/slug->schema-name, which platform cannot require; a test pins the two together.
A tenant's schema. Mirrors wagoe.tenant.core.tenant/slug->schema-name, which platform cannot require; a test pins the two together.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |