Elgg
Version master
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
5
class
CreateGeoCacheTable
extends
AbstractMigration {
16
public
function
change
() {
17
18
if
($this->hasTable(
"geocode_cache"
)) {
19
return
;
20
}
21
22
$table
= $this->table(
"geocode_cache"
, [
23
'engine'
=>
"MEMORY"
,
24
'encoding'
=>
"utf8mb4"
,
25
'collation'
=>
"utf8mb4_general_ci"
,
26
]);
27
28
$table
->addColumn(
'location'
,
'string'
, [
29
'null'
=>
true
,
30
'limit'
=> 128,
31
]);
32
33
$table
->addColumn(
'lat'
,
'string'
, [
34
'null'
=>
true
,
35
'limit'
=> 20,
36
]);
37
38
$table
->addColumn(
'long'
,
'string'
, [
39
'null'
=>
true
,
40
'limit'
=> 20,
41
]);
42
43
$table
->addIndex([
'location'
], [
44
'name'
=>
"location"
,
45
'unique'
=>
true
46
]);
47
48
$table
->save();
49
50
}
51
}
CreateGeoCacheTable
Definition:
20170728074757_create_geo_cache_table.php:5
$table
$table
Definition:
user.php:37
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:16
Generated on Mon Dec 30 2024 00:02:52 for Elgg by
1.8.11