Migration Issues |
08-09-2016, 11:33 AM
(This post was last modified: 08-10-2016, 08:37 AM by Parker1090. Edit Reason: Found reason for DB Insert )
Hi all,
I don't believe I'm doing anything wrong here (hopefully not!), but any pointers massively appreciated. Firstly, I have migrations set up to timestamp, and have auto_latest set to true. Migrating up a version works perfectly fine. However, migrating down a version does not - nothing changes, not even the version number in the database. For reference, this is my migration.php file in the config folder: PHP Code: <?php And my log file states: Code: DEBUG - 2016-08-09 19:30:05 --> Finished migrating to 20160809185000 I'm not sure if it's related, but my migrations table seems to keep getting bigger and bigger, with multiple rows of the same value appearing over and over (currently 105 rows, but a new one is created each time I refresh a page of my site). I'm running XAMPP on Windows 10. PHP 5.6.21, with MariaDB. As I said, any pointers would be great because my table just seems to keep growing! [Edit - 10/08/2016] I've been looking over the Migration.php code in the /system folder (v3.0.6) to see if I can figure any of this out. It appears to be down to casing. My table (in the config file above) is called 'Migration', but MariaDB seems to store this as 'migration', which is causing the line 167 to return true, and then go on to insert a new row: PHP Code: if ( ! $this->db->table_exists($this->_migration_table)) PHP Code: echo 'DEBUG:<br> Which gives me the following: Quote:DEBUG: But the table does 100% exist, and is in the array from the list_tables() DB call, except stored as 'migration' with a lowercase 'm' |
Welcome Guest, Not a member yet? Register Sign In |