Skip to content

Commit

Permalink
Database migrations are now part of the core code
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Roach committed Jul 14, 2018
1 parent ec4ce3b commit 0f3d448
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 204 deletions.
48 changes: 0 additions & 48 deletions app/Module/OpenStreetMap/Schema/Migration0.php

This file was deleted.

47 changes: 0 additions & 47 deletions app/Module/OpenStreetMap/Schema/Migration1.php

This file was deleted.

31 changes: 0 additions & 31 deletions app/Module/OpenStreetMap/Schema/Migration2.php

This file was deleted.

69 changes: 0 additions & 69 deletions app/Module/OpenStreetMap/Schema/Migration3.php

This file was deleted.

9 changes: 0 additions & 9 deletions app/Module/OpenStreetMapModule.php
Expand Up @@ -43,11 +43,6 @@
*/
class OpenStreetMapModule extends AbstractModule implements ModuleConfigInterface, ModuleTabInterface, ModuleChartInterface {

// How to update the database schema for this module
const SCHEMA_TARGET_VERSION = 4;
const SCHEMA_SETTING_NAME = 'OSM_SCHEMA_VERSION';
const SCHEMA_MIGRATION_PREFIX = '\Fisharebest\Webtrees\Module\OpenStreetMap\Schema';

// Package version numbers
const LEAFLET = '1.3.1';
const LEAFLET_BEAU = '1.0.5';
Expand Down Expand Up @@ -115,8 +110,6 @@ public function modAction($mod_action) {

/** {@inheritdoc} */
public function getConfigLink() {
Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);

return route('admin-module', ['module' => $this->getName(), 'action' => 'AdminConfig']);
}

Expand Down Expand Up @@ -250,8 +243,6 @@ public function getBaseDataAction(Request $request): JsonResponse {
* @throws \Exception
*/
public function getMapDataAction(Request $request): JsonResponse {
Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);

switch ($request->get('type')) {
case 'placelist':
$response = $this->placelistGetMapData($request);
Expand Down

0 comments on commit 0f3d448

Please sign in to comment.