Elgg
Version master
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
schema
migrations
20171021111132_align_subtype_columns.php
Go to the documentation of this file.
1
<?php
2
3
use
Phinx\Migration\AbstractMigration
;
4
5
class
AlignSubtypeColumns
extends
AbstractMigration {
27
public
function
change
() {
28
29
$options
= [
30
'null'
=>
false
,
31
'limit'
=> 252,
32
'encoding'
=>
"utf8"
,
33
'collation'
=>
"utf8_general_ci"
,
34
];
35
36
$table
= $this->table(
'river'
);
37
$table
->changeColumn(
'subtype'
,
'string'
,
$options
)->save();
38
39
$table
= $this->table(
'entities'
);
40
$table
->changeColumn(
'subtype'
,
'string'
,
$options
)->save();
41
42
$table
= $this->table(
'system_log'
);
43
44
$table
->removeIndexByName(
'river_key'
)->save();
45
46
$table
->changeColumn(
'object_subtype'
,
'string'
,
$options
)->save();
47
48
$table
->addIndex([
49
'object_type'
,
50
'object_subtype'
,
51
'event'
52
], [
53
'name'
=>
"river_key"
,
54
'unique'
=>
false
,
55
'limit'
=> 25,
56
]);
57
58
$table
->save();
59
}
60
}
AlignSubtypeColumns
Definition:
20171021111132_align_subtype_columns.php:5
AlignSubtypeColumns\change
change()
Change Method.
Definition:
20171021111132_align_subtype_columns.php:27
$options
if($who_can_change_language=== 'nobody') elseif($who_can_change_language=== 'admin_only'&&!elgg_is_admin_logged_in()) $options
Definition:
language.php:20
$table
$table
Definition:
user.php:37
AbstractMigration
Generated on Wed Dec 4 2024 00:02:57 for Elgg by
1.8.11