|
Revision 2, 0.7 kB
(checked in by nperriault, 10 months ago)
|
First commit of the extracted code from production, I hope no passwd has been forgotten :-)
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
class Migration003 extends sfMigration |
|---|
| 3 |
{ |
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
public function up() |
|---|
| 7 |
{ |
|---|
| 8 |
$this->executeSQL( |
|---|
| 9 |
"CREATE TABLE `sf_geolocalization` ( |
|---|
| 10 |
`id` INTEGER NOT NULL AUTO_INCREMENT, |
|---|
| 11 |
`model_name` VARCHAR(255) NOT NULL, |
|---|
| 12 |
`model_id` INTEGER NOT NULL, |
|---|
| 13 |
`latitude` FLOAT (12, 6) NOT NULL, |
|---|
| 14 |
`longitude` FLOAT (12, 6) NOT NULL, |
|---|
| 15 |
PRIMARY KEY (`id`), |
|---|
| 16 |
UNIQUE KEY `object` (`model_name`, `model_id`), |
|---|
| 17 |
KEY `geo_index`(`model_name`, `model_id`, `latitude`, `longitude`) |
|---|
| 18 |
)Type=MyISAM;"); |
|---|
| 19 |
} |
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
public function down() |
|---|
| 23 |
{ |
|---|
| 24 |
$this->executeSQL("DROP TABLE IF EXISTS `sf_geolocalization`;"); |
|---|
| 25 |
} |
|---|
| 26 |
|
|---|
| 27 |
} |
|---|
| 28 |
|
|---|