You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat!: rename module from cfmigrations to cbMigrations
BREAKING CHANGE: the module is renamed from `cfmigrations` to `cbMigrations`
to match the Ortus `cbXxx` naming convention. This changes the module name,
ForgeBox slug, WireBox mappings (`cbMigrations.models.QBMigrationManager`),
the DSL injection name (`MigrationService@cbMigrations`), and the
moduleSettings key (`cbMigrations`). The default migrations tracking table
also renames from `cfmigrations` to `cbmigrations` — `install()` now detects
a legacy `cfmigrations` table and renames it in place so existing migration
history carries forward automatically.
GitHub links in box.json and README now point at coldbox-modules/cbMigrations
ahead of the planned repository rename. Also drops CI/test support for the
EOL Adobe 2021 and Lucee 5 engines.
https://claude.ai/code/session_01BN233VRgXRMBvRxQNyqTJt
Copy file name to clipboardExpand all lines: README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# cfmigrations
1
+
# cbMigrations
2
2
3
3
## Keep track and run your database migrations with CFML.
4
4
@@ -32,7 +32,7 @@ component {
32
32
33
33
> **Warning:** The `pretend` feature only works with `qb`'s `SchemaBuilder` and `QueryBuilder`. It does **not** work with `queryExecute` or any other method of executing SQL. If your migration uses `queryExecute`, the `pretend` flag will have no effect and the SQL will be executed normally.
34
34
35
-
The name of this file could be something like `2017_09_03_043150_create_users_table.cfc`. The first 17 characters of this file represent the timestamp of the migration and need to be in this format: `YYYY_MM_DD_HHMISS`. The reason for this is so `cfmigrations` can run the migrations in the correct order. You may have migrations that add columns to a table, so you need to make sure the table exists first. In this case, just make sure the timestamp for adding the new column comes after the timestamp for creating the table, like so:
35
+
The name of this file could be something like `2017_09_03_043150_create_users_table.cfc`. The first 17 characters of this file represent the timestamp of the migration and need to be in this format: `YYYY_MM_DD_HHMISS`. The reason for this is so `cbMigrations` can run the migrations in the correct order. You may have migrations that add columns to a table, so you need to make sure the table exists first. In this case, just make sure the timestamp for adding the new column comes after the timestamp for creating the table, like so:
36
36
37
37
```
38
38
2017_09_03_043150_create_users_table.cfc
@@ -43,23 +43,23 @@ An easy way to generate these files is to use `commandbox-migrations` and the `m
43
43
44
44
### Installation and Uninstallation
45
45
46
-
In order to track which migrations have been ran, `cfmigrations` needs to install a tracking mechanism. For database migrations this creates a table in your database called `cfmigrations` by default. You can do this by calling the `install()` method or by running the `migrate install` command from `commandbox-migrations`.
46
+
In order to track which migrations have been ran, `cbMigrations` needs to install a tracking mechanism. For database migrations this creates a table in your database called `cbmigrations` by default. You can do this by calling the `install()` method or by running the `migrate install` command from `commandbox-migrations`.
47
47
48
48
If you find a need to, you can uninstall the migrations tracker by calling the `uninstall()` method or by running `migrate uninstall` from `commandbox-migrations`. Running this method will rollback all ran migrations before removing the migrations tracker.
49
49
50
50
### Configuration
51
51
52
-
The module is configured by default with a single migration service that interact with your database, optionally using qb. Multiple migration services with different managers may also be configured. The default manager for the cfmigrations is `QBMigrationManager`, but you may use others, such as those included with the `cbmongodb` and `cbelasticsearch` modules or roll your own.
52
+
The module is configured by default with a single migration service that interact with your database, optionally using qb. Multiple migration services with different managers may also be configured. The default manager for cbMigrations is `QBMigrationManager`, but you may use others, such as those included with the `cbmongodb` and `cbelasticsearch` modules or roll your own.
53
53
54
54
The default configuration for the module settings are:
55
55
56
56
```cfc
57
57
moduleSettings = {
58
-
"cfmigrations" : {
58
+
"cbMigrations" : {
59
59
"managers" : {
60
60
"default" : {
61
61
// The manager handling and executing the migration files
Migration files need to follow a specific naming convention — `YYYY_MM_DD_HHMISS_[describe_your_changes_here].cfc`. This is how `cfmigrations` knows in what order to run your migrations. Generating these files is made easier with the `migrate create` command from `commandbox-migrations`.
145
+
Migration files need to follow a specific naming convention — `YYYY_MM_DD_HHMISS_[describe_your_changes_here].cfc`. This is how `cbMigrations` knows in what order to run your migrations. Generating these files is made easier with the `migrate create` command from `commandbox-migrations`.
146
146
147
147
Using the injected `qb` instance, you can insert or update required data for your application. If you want to create test data for your application, take a look at seeders below instead.
148
148
@@ -152,7 +152,7 @@ There is no limit to what you can do in a migration. It is recommended that you
152
152
153
153
There are a few methods for working with migrations. (Each of these methods has a related command in `commandbox-migrations`.)
154
154
155
-
These methods can be run by injecting `MigrationService@cfmigrations` - for example: `getInstance( "MigrationService@cfmigrations" ).runAllMigrations( "up" )` will run all migrations.
155
+
These methods can be run by injecting `MigrationService@cbMigrations` - for example: `getInstance( "MigrationService@cbMigrations" ).runAllMigrations( "up" )` will run all migrations.
156
156
157
157
#### `runNextMigration`
158
158
@@ -236,7 +236,7 @@ component {
236
236
237
237
#### Setting Schema
238
238
239
-
It's important to set the `schema` attribute for `cfmigrations`. Without it, `cfmigrations` can't tell the difference
239
+
It's important to set the `schema` attribute for `cbMigrations`. Without it, `cbMigrations` can't tell the difference
240
240
between a migration table installed in the schema you want and any other schema on the same database. You can
241
241
set the schema by calling the `setSchema( string schema )` method.
0 commit comments