Elgg
Version master
engine
schema
migrations
20170808084728_drop_geocode_cache.php
Go to the documentation of this file.
1
<?php
2
3
use Phinx\Migration\AbstractMigration;
4
5
class
DropGeocodeCache
extends
AbstractMigration {
6
10
public
function
up
() {
11
$this->table(
'geocode_cache'
)->drop()->save();
12
}
13
17
public
function
down
() {
18
$table
= $this->table(
"geocode_cache"
, [
19
'engine'
=>
"MEMORY"
,
20
'encoding'
=>
"utf8mb4"
,
21
'collation'
=>
"utf8mb4_general_ci"
,
22
]);
23
24
$table
->addColumn(
'location'
,
'string'
, [
25
'null'
=>
true
,
26
'limit'
=> 128,
27
]);
28
29
$table
->addColumn(
'lat'
,
'string'
, [
30
'null'
=>
true
,
31
'limit'
=> 20,
32
]);
33
34
$table
->addColumn(
'long'
,
'string'
, [
35
'null'
=>
true
,
36
'limit'
=> 20,
37
]);
38
39
$table
->addIndex([
'location'
], [
40
'name'
=>
"location"
,
41
'unique'
=>
true
42
]);
43
44
$table
->save();
45
}
46
}
$table
$table
Definition:
user.php:37
DropGeocodeCache
Definition:
20170808084728_drop_geocode_cache.php:5
DropGeocodeCache\up
up()
Migrate Up.
Definition:
20170808084728_drop_geocode_cache.php:10
DropGeocodeCache\down
down()
Migrate Down.
Definition:
20170808084728_drop_geocode_cache.php:17
Generated on Wed Aug 13 2025 00:01:44 for Elgg by
1.9.1