PHP Method Schema::create_table, someline-starter Code Examples

This page contains top rated real world PHP examples of method Schema::create_table from package someline-starter extracted from open source projects. You can rate examples to help us improve the quality of examples
Frequently Used Methods
Example #1
Show file File: migrations.php Project: nonconforme/ci-chat-1
0
 public function install()
 {
     $this->load->database();
     $this->load->library('schema');
     $table_name = 'messages';
     $query = $this->db->query("SHOW TABLES LIKE '{$table_name}'");
     if ($query->num_rows > 0) {
         exit("Database tables already exist.\n");
     } else {
         Schema::create_table($table_name, function ($table) {
             $table->auto_increment_integer('id');
             $table->string('author', 50);
             $table->text('message');
             $table->datetime('created_at');
             $table->key('created_at');
         });
         print "Database tables were created successfully.\n";
     }
 }
Example #2
Show file File: Schema_test.php Project: fagray/codeigniter-schema
0
 public function test_create_table_52()
 {
     $table = Schema::create_table('name', FALSE);
     $this->assert_class($table, 'Schema_Table_Definition');
 }