File tree Expand file tree Collapse file tree
src/Command/Generate/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ class Migration_@@classname@@ extends CI_Migration {
99
1010 public function up()
1111 {
12+ // // Creating a table
1213// $this->dbforge->add_field(array(
1314// 'blog_id' => array(
1415// 'type' => 'INT',
@@ -19,18 +20,33 @@ class Migration_@@classname@@ extends CI_Migration {
1920// 'type' => 'VARCHAR',
2021// 'constraint' => 100,
2122// ),
23+ // 'blog_author' => array(
24+ // 'type' =>'VARCHAR',
25+ // 'constraint' => '100',
26+ // 'default' => 'King of Town',
27+ // ),
2228// 'blog_description' => array(
2329// 'type' => 'TEXT',
2430// 'null' => TRUE,
2531// ),
2632// ));
2733// $this->dbforge->add_key('blog_id', TRUE);
2834// $this->dbforge->create_table('blog');
35+
36+ // // Adding a Column to a Table
37+ // $fields = array(
38+ // 'preferences' => array('type' => 'TEXT')
39+ // );
40+ // $this->dbforge->add_column('table_name', $fields);
2941 }
3042
3143 public function down()
3244 {
45+ // // Dropping a table
3346// $this->dbforge->drop_table('blog');
47+
48+ // // Dropping a Column From a Table
49+ // $this->dbforge->drop_column('table_name', 'column_to_drop');
3450 }
3551
3652}
You can’t perform that action at this time.
0 commit comments