Elgg
Version 3.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
schema
migrations
20170728074757_create_geo_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
CreateGeoCacheTable
extends
AbstractMigration {
17
public
function
change
() {
18
19
if
($this->hasTable(
"geocode_cache"
)) {
20
return
;
21
}
22
23
$table
= $this->table(
"geocode_cache"
, [
24
'engine'
=>
"MEMORY"
,
25
'encoding'
=>
"utf8mb4"
,
26
'collation'
=>
"utf8mb4_general_ci"
,
27
]);
28
29
$table
->addColumn(
'location'
,
'string'
, [
30
'null'
=>
true
,
31
'limit'
=> 128,
32
]);
33
34
$table
->addColumn(
'lat'
,
'string'
, [
35
'null'
=>
true
,
36
'limit'
=> 20,
37
]);
38
39
$table
->addColumn(
'long'
,
'string'
, [
40
'null'
=>
true
,
41
'limit'
=> 20,
42
]);
43
44
$table
->addIndex([
'location'
], [
45
'name'
=>
"location"
,
46
'unique'
=>
true
47
]);
48
49
$table
->save();
50
51
}
52
}
MysqlAdapter
CreateGeoCacheTable
Definition:
20170728074757_create_geo_cache_table.php:6
AbstractMigration
CreateGeoCacheTable\change
change()
CREATE TABLE prefix_geocode_cache ( id int(11) NOT NULL AUTO_INCREMENT, location varchar(128) DEFAULT...
Definition:
20170728074757_create_geo_cache_table.php:17
$table
$table
Definition:
cron.php:57
Generated on Fri Feb 26 2021 00:00:22 for Elgg by
1.8.11