Elgg
Version master
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
schema
migrations
20170728075716_create_config_table.php
Go to the documentation of this file.
1
<?php
2
3
use
Phinx\Migration\AbstractMigration
;
4
use
Phinx\Db\Adapter\MysqlAdapter
;
5
6
class
CreateConfigTable
extends
AbstractMigration {
14
public
function
change
() {
15
16
if
($this->hasTable(
"config"
)) {
17
return
;
18
}
19
20
$table
= $this->table(
"config"
, [
21
'id'
=>
false
,
22
'primary_key'
=> [
"name"
],
23
'engine'
=>
"InnoDB"
,
24
'encoding'
=>
"utf8mb4"
,
25
'collation'
=>
"utf8mb4_general_ci"
,
26
]);
27
28
$table
->addColumn(
'name'
,
'string'
, [
29
'null'
=>
false
,
30
'limit'
=> MysqlAdapter::TEXT_SMALL,
31
'encoding'
=>
"utf8"
,
32
'collation'
=>
"utf8_general_ci"
,
33
]);
34
35
$table
->addColumn(
'value'
,
'text'
, [
36
'null'
=>
false
,
37
'limit'
=> MysqlAdapter::TEXT_LONG,
38
]);
39
40
$table
->save();
41
}
42
}
MysqlAdapter
CreateConfigTable\change
change()
CREATE TABLE prefix_config ( name varchar(255) CHARACTER SET utf8 NOT NULL, value LONGTEXT NOT NULL...
Definition:
20170728075716_create_config_table.php:14
CreateConfigTable
Definition:
20170728075716_create_config_table.php:6
$table
$table
Definition:
user.php:37
AbstractMigration
Generated on Sat Dec 21 2024 00:02:53 for Elgg by
1.8.11