Make sure that sstv images table doesnt already exist
这个提交包含在:
		
							父节点
							
								
									ab8abd1ccc
								
							
						
					
					
						当前提交
						41bc9b3e1b
					
				
					共有  1 个文件被更改,包括 29 次插入 和 25 次删除
				
			
		|  | @ -1,11 +1,14 @@ | ||||||
| <?php | <?php | ||||||
| 
 | 
 | ||||||
| defined('BASEPATH') OR exit('No direct script access allowed'); | defined('BASEPATH') or exit('No direct script access allowed'); | ||||||
| 
 | 
 | ||||||
| class Migration_add_sstv_images_table extends CI_Migration { | class Migration_add_sstv_images_table extends CI_Migration | ||||||
|  | { | ||||||
| 
 | 
 | ||||||
|         public function up() |         public function up() | ||||||
|         { |         { | ||||||
|  |                 // if sstv_images table doesn't exist
 | ||||||
|  |                 if (!$this->db->table_exists('sstv_images')) { | ||||||
|                         $this->dbforge->add_field(array( |                         $this->dbforge->add_field(array( | ||||||
|                                 'id' => array( |                                 'id' => array( | ||||||
|                                         'type' => 'INT', |                                         'type' => 'INT', | ||||||
|  | @ -29,6 +32,7 @@ class Migration_add_sstv_images_table extends CI_Migration { | ||||||
|                         $this->dbforge->add_key('id', TRUE); |                         $this->dbforge->add_key('id', TRUE); | ||||||
|                         $this->dbforge->create_table('sstv_images'); |                         $this->dbforge->create_table('sstv_images'); | ||||||
|                 } |                 } | ||||||
|  |         } | ||||||
| 
 | 
 | ||||||
|         public function down() |         public function down() | ||||||
|         { |         { | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用