Welcome Guest, Not a member yet? Register   Sign In
Database version control / synchronization plugin
#11

[eluser]Lukifer[/eluser]
This looks awesome. Been looking for a good solution to this for a while. Thanks!
#12

[eluser]philpalmieri[/eluser]
ciscoheat: not sure what version of CI you wrote this on... But on dbversionci_pi.php line 71 You may want to change to
Code:
$this->db->select('IFNULL(MAX(version), 0) AS version', FALSE);

Adding the FALSE so the db doesnt auto comment stuff out.
#13

[eluser]Whit Nelson[/eluser]
Is this project dead? I've been tweaking it to make it work in the latest version of CI, but I haven't seen a response to the question about createTable, there doesn't seem to be a command for that.
#14

[eluser]codeninja[/eluser]
I am interested in this too.. also does anyone know how can I start using migration on my existing CI application?
#15

[eluser]Whit Nelson[/eluser]
Might just be you and me on this codeninja, but I would love to reboot this thing.

So, I've converted the plugins into helpers (plugins are no longer supported), and it looks like we need to create a createTable function for this be a workable solution (I'm really surprised it's completely absent, am I just missing something?)

Next step is to model your existing schema in XML, then drop your existing data in as an SQL insert (there is a place for that in the XML).

I really think this would be a valuable asset to the CI community.
#16

[eluser]InsiteFX[/eluser]
Code:
$table = "CREATE TABLE `members` (
  id int(11) NOT NULL auto_increment,
  username varchar(255) NOT NULL,
  email varchar(255) NOT NULL,
  password varchar(255) NOT NULL,
  website varchar(255) NULL,
  account_type enum('a','b','c') NOT NULL default 'a',
  PRIMARY KEY (id),
  UNIQUE KEY email (email) )";
  
  // This line uses the db->query() function to create the table now
  $query = $this->db->query($table);




Theme © iAndrew 2016 - Forum software by © MyBB