public function ensureTable()
	{
		if ($this->tableChecked || $this->db->tableExists($this->table))
		{
			return;
		}

		$forge = \Config\Database::forge($this->db);

		$forge->addField([
			'version'   => [
				'type'       => 'VARCHAR',
				'constraint' => 255,
				'null'       => false,
			],
			'name'      => [
				'type'       => 'VARCHAR',
				'constraint' => 255,
				'null'       => false,
			],
			'group'     => [
				'type'       => 'VARCHAR',
				'constraint' => 255,
				'null'       => false,
			],
			'namespace' => [
				'type'       => 'VARCHAR',
				'constraint' => 255,
				'null'       => false,
			],
			'time'      => [
				'type'       => 'INT',
				'constraint' => 11,
				'null'       => false,
			],
		]);

		$forge->createTable($this->table, true);

		$this->tableChecked = true;
	}
public function ensureTable()
	{
		if ($this->tableChecked || $this->db->tableExists($this->table))
		{
			return;
		}

		$forge = \Config\Database::forge($this->db);

		$forge->addField([
			'version'   => [
				'type'       => 'VARCHAR',
				'constraint' => 255,
				'null'       => false,
			],
			'name'      => [
				'type'       => 'VARCHAR',
				'constraint' => 255,
				'null'       => false,
			],
			'group'     => [
				'type'       => 'VARCHAR',
				'constraint' => 255,
				'null'       => false,
			],
			'namespace' => [
				'type'       => 'VARCHAR',
				'constraint' => 255,
				'null'       => false,
			],
			'time'      => [
				'type'       => 'INT',
				'constraint' => 11,
				'null'       => false,
			],
		]);

		$forge->createTable($this->table, true);

		$this->tableChecked = true;
	}
public function ensureTable ( ) { if ( $ this -> tableChecked || $ this -> db -> tableExists ( $ this -> table ) ) { return ; } $ forge = \ Config \ Database :: forge ( $ this -> db ) ; $ forge -> addField ( [ 'version' => [ 'type' => 'VARCHAR' , 'constraint' => 255 , 'null' => false , ] , 'name' => [ 'type' => 'VARCHAR' , 'constraint' => 255 , 'null' => false , ] , 'group' => [ 'type' => 'VARCHAR' , 'constraint' => 255 , 'null' => false , ] , 'namespace' => [ 'type' => 'VARCHAR' , 'constraint' => 255 , 'null' => false , ] , 'time' => [ 'type' => 'INT' , 'constraint' => 11 , 'null' => false , ] , ] ) ; $ forge -> createTable ( $ this -> table , true ) ; $ this -> tableChecked = true ; }
Ensures that we have created our migrations table
in the database.
Ensures that we have created our migrations table in the database .