I’ve started to use the Yiiboilerplate. I think this is great directory structure, but I have a very big problem…
I can’t create the user table in my database and the
./runpostdeploy environmentType migrations
command always give me exceptions.
At firstly I don’t find any step by step guide, how I can setting the user table and I still don’t find any good article by the google.
At firstly I configurated the db connections. It is good. Then I executed this command in terminal(ubuntu):
./runpostdeploy environmentType migrations
The result was a lot of exceptions… the first was: “Don’t find the tbl_migration table”. Okay, so I created this table in my database.
After this I got another exception: "‘CDbException’ with message ‘CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘version’ in ‘field list’’ ". And I don’t know, what kind of table shema I have to use on tbl_migration. I don’t find any information about this.
I just would like to run /console/migration/m120805_131754_user_table_migration.php file, but I don’t have any ideas how I can run it…
Map domainname.com (or similar) to frontend > www (if required)
Create database for app
Create database for test with suffix _test (if required)
Add db details to common > config > params-local.php
OR common > config > environments > [ either of the files here ( params-private.php or params-prod.php depending on what you need or copy one of them as a template to create one for the environment you’re setting up like params-staging.php ]
Remove comments from db connections in console > config > main.php
Remove comments from db connections and gii in backend > config > main.php
Remove comments from db connections in frontend > config > main.php (if required)
$ ./runpostdeploy local no-migrate
$ ./yiic migrate