Besides fixing a few bugs, I'm excited to have added a feature that I
really wanted, which is the ability to perform migrations by calling a
URL with parameters. So now on my test/production servers in my bash
script that deploys my application from my ZIP file, it performs three
wget calls (one to change to maintenance mode, one to migrate to the
latest database version and one to change to production mode) to
migrate to the latest version of my database and reload the
application.
To perform migrations via URL here's what I have in my script:
wget --no-check-certificate --no-cache --no-cookies --quiet
"https://<domain-name-here>/rewrite.cfm?controller=wheels&action=wheels&view=plugins&name=dbmigrate&password=<cfwheels-reload-password-here>&migrateToVersion=99999999999999"
-O /tmp/deploy/migrate.out
Use "migrateToVersion=99999999999999" to migrate to the latest version
of your database.
Use "migrateToVersion=0" to remove all migrations from your database
Use "migrateToVersion=12345678912345" to migrate to that specific
database version
The complete changlog is at
https://github.com/talltroym/cfwheels-dbmigrate-plugin/blob/master/CHANGELOG.md
--
Troy Murray
--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.
I haven't had to deal with that situation yet. Which DB are you using?
-t
--
Troy Murray
Here's the create table syntax for one of my tables… notice the last two attributes..
CREATE TABLE `snippets` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) CHARACTER SET latin1 DEFAULT NULL,
`filename` varchar(39) CHARACTER SET latin1 DEFAULT NULL,
`content` text CHARACTER SET latin1,
`createdByID` int(11) DEFAULT NULL,
`updatedByID` int(11) DEFAULT NULL,
`createdat` datetime DEFAULT NULL,
`updatedat` datetime DEFAULT NULL,
`deletedat` datetime DEFAULT NULL,
`categoryid` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
Right now DBMigrate doesn't specify these two atributes. However,
from what I understand, you can set this on a DATABASE level rather
then a table level. So if you CREATE or ALTER the database for utf8
then all of the tables you create with DBMigrate should have that set.
CREATE DATABASE db_name
[[DEFAULT] CHARACTER SET charset_name]
[[DEFAULT] COLLATE collation_name]
ALTER DATABASE db_name
[[DEFAULT] CHARACTER SET charset_name]
[[DEFAULT] COLLATE collation_name]
http://dev.mysql.com/doc/refman/5.0/en/charset-database.html
HTH,
-t