Elgg
Version 6.1
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
schema
migrations
20170728074959_create_objects_entity_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
CreateObjectsEntityTable
extends
AbstractMigration {
15
public
function
change
() {
16
17
if
($this->hasTable(
"objects_entity"
)) {
18
return
;
19
}
20
21
$table
= $this->table(
"objects_entity"
, [
22
'id'
=>
false
,
23
'primary_key'
=> [
"guid"
],
24
'engine'
=>
"InnoDB"
,
25
'encoding'
=>
"utf8mb4"
,
26
'collation'
=>
"utf8mb4_general_ci"
,
27
]);
28
29
$table
->addColumn(
'guid'
,
'integer'
, [
30
'null'
=>
false
,
31
'limit'
=> MysqlAdapter::INT_BIG,
32
'precision'
=> 20,
33
]);
34
35
$table
->addColumn(
'title'
,
'text'
, [
36
'null'
=>
false
,
37
]);
38
39
$table
->addColumn(
'description'
,
'text'
, [
40
'null'
=>
false
,
41
'limit'
=> MysqlAdapter::TEXT_LONG,
42
]);
43
44
$table
->save();
45
46
}
47
}
MysqlAdapter
CreateObjectsEntityTable
Definition:
20170728074959_create_objects_entity_table.php:6
$table
$table
Definition:
user.php:37
AbstractMigration
CreateObjectsEntityTable\change
change()
CREATE TABLE prefix_objects_entity ( guid bigint(20) unsigned NOT NULL, title text NOT NULL...
Definition:
20170728074959_create_objects_entity_table.php:15
Generated on Wed Dec 4 2024 00:00:22 for Elgg by
1.8.11