mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
34 lines
685 B
PHP
Executable File
34 lines
685 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Database\Migrations;
|
|
|
|
use CodeIgniter\Database\Migration;
|
|
|
|
class CreateGroupUserTable extends Migration
|
|
{
|
|
public function up()
|
|
{
|
|
// define table fields
|
|
$fields = array(
|
|
'token_user' => array(
|
|
'type' => 'VARCHAR',
|
|
'constraint' => 35
|
|
),
|
|
'token_group' => array(
|
|
'type' => 'VARCHAR',
|
|
'constraint' => 35
|
|
)
|
|
);
|
|
|
|
$this->forge->addField($fields);
|
|
|
|
// create table
|
|
$this->forge->createTable('group_user');
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
$this->forge->dropTable('group_user',TRUE);
|
|
}
|
|
}
|