Elgg
Version 6.1
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
schema
migrations
20170728074857_create_hmac_cache_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
CreateHmacCacheTable
extends
AbstractMigration {
15
public
function
change
() {
16
17
if
($this->hasTable(
"hmac_cache"
)) {
18
return
;
19
}
20
21
$table
= $this->table(
"hmac_cache"
, [
22
'id'
=>
false
,
23
'primary_key'
=> [
"hmac"
],
24
'engine'
=>
"MEMORY"
,
25
'encoding'
=>
"utf8mb4"
,
26
'collation'
=>
"utf8mb4_general_ci"
,
27
]);
28
29
$table
->addColumn(
'hmac'
,
'string'
, [
30
'null'
=>
false
,
31
'limit'
=> MysqlAdapter::TEXT_SMALL,
32
'encoding'
=>
"utf8"
,
33
'collation'
=>
"utf8_general_ci"
,
34
]);
35
36
$table
->addColumn(
'ts'
,
'integer'
, [
37
'null'
=>
false
,
38
'limit'
=> MysqlAdapter::INT_REGULAR,
39
'precision'
=> 11,
40
]);
41
42
$table
->addIndex([
'ts'
], [
43
'name'
=>
"ts"
,
44
'unique'
=>
false
,
45
]);
46
47
$table
->save();
48
49
}
50
}
MysqlAdapter
CreateHmacCacheTable
Definition:
20170728074857_create_hmac_cache_table.php:6
$table
$table
Definition:
user.php:37
AbstractMigration
CreateHmacCacheTable\change
change()
CREATE TABLE prefix_hmac_cache ( hmac varchar(255) CHARACTER SET utf8 NOT NULL, ts int(11) NOT NULL...
Definition:
20170728074857_create_hmac_cache_table.php:15
Generated on Wed Dec 4 2024 00:00:22 for Elgg by
1.8.11