Skip to content

Commit f912afc

Browse files
committed
Fix renaming of the package
1 parent 142d9d0 commit f912afc

File tree

9 files changed

+11
-10
lines changed

9 files changed

+11
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
modules
22
TASKS.md
3+
jmimemagic.log

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# CFMigrations Commands
1+
# `commandbox-migrations`
22

3-
## Run your cfmigrations from CommandBox
3+
## Run your [`cfmigrations`](https://github.com/elpete/cfmigrations) from CommandBox
44

55
You need to set up some information in your `box.json`:
66

@@ -24,7 +24,7 @@ The `connectionInfo` object is the information to create an on the fly connectio
2424

2525
You may notice that the values are surrounded in an escape sequence (`${}`). This is how CommandBox injects environment variables into your `box.json` file. Why environment variables? Because you don't want to commit your database credentials in to source control. Also, you want to be able to have different values in different environments. Whether you have dedicated servers or are running your application in containers, you can find the supported way to add environment variables to your platform.
2626

27-
For local development using CommandBox, I recommend using the package [`commandbox-dotenv`](https://forgebox.io/view/commandbox-dotenv). This package lets you define environment variables in a `.env` file in the root of your project. CommandBox will add these to your server when starting it up and also to the CommandBox instance if you load or reload the shell in a directory with a `.env` file. That is how we will get our environment variables available for `cfmigrations-commands`.
27+
For local development using CommandBox, I recommend using the package [`commandbox-dotenv`](https://forgebox.io/view/commandbox-dotenv). This package lets you define environment variables in a `.env` file in the root of your project. CommandBox will add these to your server when starting it up and also to the CommandBox instance if you load or reload the shell in a directory with a `.env` file. That is how we will get our environment variables available for `commandbox-migrations`.
2828

2929
With `commandbox-dotenv` installed, create a `.env` file in the root of you project. At the very least, it will look like this:
3030

commands/migrate/create.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ component {
2828
var timestamp = dateTimeFormat( now(), "yyyy_mm_dd_hhnnss" );
2929
var migrationPath = "#arguments.directory#/#timestamp#_#arguments.name#.cfc";
3030

31-
var migrationContent = fileRead( "/cfmigrations-commands/templates/Migration.txt" );
31+
var migrationContent = fileRead( "/commandbox-migrations/templates/Migration.txt" );
3232

3333
file action="write" file="#migrationPath#" mode="777" output="#trim( migrationContent )#";
3434

commands/migrate/down.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
component extends="cfmigrations-commands.models.BaseMigrationCommand" {
1+
component extends="commandbox-migrations.models.BaseMigrationCommand" {
22

33
function run( boolean once = false, string migrationsDirectory = "resources/database/migrations" ) {
44
migrationService.setMigrationsDirectory( "#getCWD()#/#arguments.migrationsDirectory#" );

commands/migrate/install.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
component extends="cfmigrations-commands.models.BaseMigrationCommand" {
1+
component extends="commandbox-migrations.models.BaseMigrationCommand" {
22

33
function run( string migrationsDirectory = "resources/database/migrations" ) {
44
migrationService.setMigrationsDirectory( "#getCWD()#/#arguments.migrationsDirectory#" );

commands/migrate/refresh.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
component extends="cfmigrations-commands.models.BaseMigrationCommand" {
1+
component extends="commandbox-migrations.models.BaseMigrationCommand" {
22

33
function run( string migrationsDirectory = "resources/database/migrations" ) {
44
migrationService.setMigrationsDirectory( "#getCWD()#/#arguments.migrationsDirectory#" );

commands/migrate/uninstall.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
component extends="cfmigrations-commands.models.BaseMigrationCommand" {
1+
component extends="commandbox-migrations.models.BaseMigrationCommand" {
22

33
function run( string migrationsDirectory = "resources/database/migrations" ) {
44
migrationService.setMigrationsDirectory( "#getCWD()#/#arguments.migrationsDirectory#" );

commands/migrate/up.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
component extends="cfmigrations-commands.models.BaseMigrationCommand" {
1+
component extends="commandbox-migrations.models.BaseMigrationCommand" {
22

33
function run( boolean once = false, string migrationsDirectory = "resources/database/migrations" ) {
44
migrationService.setMigrationsDirectory( "#getCWD()#/#arguments.migrationsDirectory#" );

models/BaseMigrationCommand.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ component {
3636
var boxJSON = packageService.readPackageDescriptor( directory );
3737

3838
if ( ! JSONService.check( boxJSON, "cfmigrations" ) ) {
39-
return error( "There is no `cfmigrations` key in your box.json. Please create one with the necessary values. See https://github.com/elpete/cfmigrations-commands" );
39+
return error( "There is no `cfmigrations` key in your box.json. Please create one with the necessary values. See https://github.com/elpete/commandbox-migrations" );
4040
}
4141

4242
return JSONService.show( boxJSON, "cfmigrations" );

0 commit comments

Comments
 (0)