Elgg
Version 6.1
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
schema
migrations
20170728075418_create_users_remember_me_cookies_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
CreateUsersRememberMeCookiesTable
extends
AbstractMigration {
16
public
function
change
() {
17
18
if
($this->hasTable(
"users_remember_me_cookies"
)) {
19
return
;
20
}
21
22
$table
= $this->table(
"users_remember_me_cookies"
, [
23
'id'
=>
false
,
24
'primary_key'
=> [
"code"
],
25
'engine'
=>
"InnoDB"
,
26
'encoding'
=>
"utf8mb4"
,
27
'collation'
=>
"utf8mb4_general_ci"
,
28
]);
29
30
$table
->addColumn(
'code'
,
'string'
, [
31
'null'
=>
false
,
32
'limit'
=> 32,
33
]);
34
35
$table
->addColumn(
'guid'
,
'integer'
, [
36
'null'
=>
false
,
37
'limit'
=> MysqlAdapter::INT_BIG,
38
'precision'
=> 20,
39
'signed'
=>
false
,
40
]);
41
42
$table
->addColumn(
'timestamp'
,
'integer'
, [
43
'null'
=>
false
,
44
'limit'
=> MysqlAdapter::INT_REGULAR,
45
'precision'
=> 11,
46
'signed'
=>
false
,
47
]);
48
49
$table
->addIndex([
'timestamp'
], [
50
'name'
=>
"timestamp"
,
51
'unique'
=>
false
,
52
]);
53
54
$table
->save();
55
}
56
}
MysqlAdapter
CreateUsersRememberMeCookiesTable
Definition:
20170728075418_create_users_remember_me_cookies_table.php:6
CreateUsersRememberMeCookiesTable\change
change()
CREATE TABLE prefix_users_remember_me_cookies ( code varchar(32) NOT NULL, guid bigint(20) unsigned N...
Definition:
20170728075418_create_users_remember_me_cookies_table.php:16
$table
$table
Definition:
user.php:37
AbstractMigration
Generated on Mon Dec 2 2024 00:00:39 for Elgg by
1.8.11