diff --git a/community_server/composer.json b/community_server/composer.json index 4f9203bd4..dbd031048 100644 --- a/community_server/composer.json +++ b/community_server/composer.json @@ -7,7 +7,6 @@ "require": { "php": ">=5.6", "cakephp/cakephp": "3.9.*", - "cakephp/migrations": "^2.0.0", "cakephp/plugin-installer": "^1.0", "datto/json-rpc": "^6.0", "google/protobuf": "v3.10.*", diff --git a/community_server/src/Application.php b/community_server/src/Application.php index dbc4640c0..66e00f733 100644 --- a/community_server/src/Application.php +++ b/community_server/src/Application.php @@ -112,8 +112,6 @@ class Application extends BaseApplication // Do not halt if the plugin is missing } - $this->addPlugin('Migrations'); - // Load more plugins here } } diff --git a/community_server/src/Controller/AppController.php b/community_server/src/Controller/AppController.php index 7ca966e98..e70b8e7bd 100644 --- a/community_server/src/Controller/AppController.php +++ b/community_server/src/Controller/AppController.php @@ -143,24 +143,8 @@ class AppController extends Controller } } - protected function checkForMigration($html = true) - { - $migrationsTable = TableRegistry::getTableLocator()->get('Migrations'); - $last_migration = $migrationsTable->find()->last(); - $current_db_version = 1; - if($last_migration) { - $current_db_version = $last_migration->db_version; - } - $php_data_version = 3; - if($current_db_version < $php_data_version) { - $this->redirect(['controller' => 'Migrations', 'action' => 'migrate', 'html' => $html, 'db_version' => $current_db_version]); - } - } - - protected function requestLogin($sessionId = 0, $redirect = true) { - $this->checkForMigration($redirect); $stateBalancesTable = TableRegistry::getTableLocator()->get('StateBalances'); $session = $this->getRequest()->getSession(); // check login diff --git a/community_server/src/Controller/MigrationsController.php b/community_server/src/Controller/MigrationsController.php deleted file mode 100644 index 47e3b611a..000000000 --- a/community_server/src/Controller/MigrationsController.php +++ /dev/null @@ -1,176 +0,0 @@ -Auth->allow('migrate'); - } - - /** - * Index method - * - * @return \Cake\Http\Response|null - */ - public function index() - { - $migrations = $this->paginate($this->Migrations); - - $this->set(compact('migrations')); - } - - protected function callFunctions(array $callables) - { - foreach($callables as $callable) { - $result = call_user_func($callable); - if(!$result['success']) { - return $result; - } - } - return ['success' => true]; - } - - public function migrate() - { - - $html = $this->request->getQuery('html'); - $current_db_version = $this->request->getQuery('db_version'); - - $startTime = microtime(true); - $stateUserTransactionsTable = TableRegistry::getTableLocator()->get('StateUserTransactions'); - $transactionsTable = TableRegistry::getTableLocator()->get('Transactions'); - $transactionTypesTable = TableRegistry::getTableLocator()->get('TransactionTypes'); - $stateBalancesTable = TableRegistry::getTableLocator()->get('StateBalances'); - $blockchainTypesTable = TableRegistry::getTableLocator()->get('BlockchainTypes'); - - $new_db_version = 1; - - $commands = []; - // migrate from version 1 to 2 - if($current_db_version == 1) { - $stateUserTransactionsTable->truncate(); - $commands = [ - [$blockchainTypesTable, 'fillWithDefault'], - [$transactionTypesTable, 'fillWithDefault'], - [$stateBalancesTable, 'truncate'], - [$transactionsTable, 'fillStateUserTransactions'], - [$stateBalancesTable, 'updateAllBalances'] - ]; - $new_db_version = 2; - } else if($current_db_version == 2) { - $commands = [ - [$stateUserTransactionsTable, 'truncate'], - [$stateBalancesTable, 'truncate'], - [$transactionsTable, 'fillStateUserTransactions'], - [$stateBalancesTable, 'updateAllBalances'] - ]; - $new_db_version = 3; - } - - $migration_result = $this->callFunctions($commands); - if($migration_result['success']) { - $migration_entity = $this->Migrations->newEntity(); - $migration_entity->db_version = $new_db_version; - $this->Migrations->save($migration_entity); - } - if(!$html) { - return $this->returnJson($migration_result); - } else { - $this->set('db_version', $current_db_version); - $this->set('result', $migration_result); - $this->set('timeUsed', microtime(true) - $startTime); - } - } - - /** - * View method - * - * @param string|null $id Migration id. - * @return \Cake\Http\Response|null - * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. - */ - public function view($id = null) - { - $migration = $this->Migrations->get($id, [ - 'contain' => [], - ]); - - $this->set('migration', $migration); - } - - /** - * Add method - * - * @return \Cake\Http\Response|null Redirects on successful add, renders view otherwise. - */ - public function add() - { - $migration = $this->Migrations->newEntity(); - if ($this->request->is('post')) { - $migration = $this->Migrations->patchEntity($migration, $this->request->getData()); - if ($this->Migrations->save($migration)) { - $this->Flash->success(__('The migration has been saved.')); - - return $this->redirect(['action' => 'index']); - } - $this->Flash->error(__('The migration could not be saved. Please, try again.')); - } - $this->set(compact('migration')); - } - - /** - * Edit method - * - * @param string|null $id Migration id. - * @return \Cake\Http\Response|null Redirects on successful edit, renders view otherwise. - * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. - */ - public function edit($id = null) - { - $migration = $this->Migrations->get($id, [ - 'contain' => [], - ]); - if ($this->request->is(['patch', 'post', 'put'])) { - $migration = $this->Migrations->patchEntity($migration, $this->request->getData()); - if ($this->Migrations->save($migration)) { - $this->Flash->success(__('The migration has been saved.')); - - return $this->redirect(['action' => 'index']); - } - $this->Flash->error(__('The migration could not be saved. Please, try again.')); - } - $this->set(compact('migration')); - } - - /** - * Delete method - * - * @param string|null $id Migration id. - * @return \Cake\Http\Response|null Redirects to index. - * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found. - */ - public function delete($id = null) - { - $this->request->allowMethod(['post', 'delete']); - $migration = $this->Migrations->get($id); - if ($this->Migrations->delete($migration)) { - $this->Flash->success(__('The migration has been deleted.')); - } else { - $this->Flash->error(__('The migration could not be deleted. Please, try again.')); - } - - return $this->redirect(['action' => 'index']); - } -} diff --git a/community_server/src/Locale/de_DE/default.po b/community_server/src/Locale/de_DE/default.po index e98855ac6..90fa91803 100644 --- a/community_server/src/Locale/de_DE/default.po +++ b/community_server/src/Locale/de_DE/default.po @@ -157,24 +157,6 @@ msgstr "" msgid "Gradido Transaktion fehlgeschlagen!" msgstr "" -#: Controller/MigrationsController.php:124 -#: Controller/MigrationsController.php:148 -msgid "The migration has been saved." -msgstr "" - -#: Controller/MigrationsController.php:128 -#: Controller/MigrationsController.php:152 -msgid "The migration could not be saved. Please, try again." -msgstr "" - -#: Controller/MigrationsController.php:169 -msgid "The migration has been deleted." -msgstr "" - -#: Controller/MigrationsController.php:171 -msgid "The migration could not be deleted. Please, try again." -msgstr "" - #: Controller/OperatorTypesController.php:54 #: Controller/OperatorTypesController.php:78 msgid "The operator type has been saved." @@ -858,9 +840,6 @@ msgstr "" #: Template/CommunityProfiles/view.ctp:9 Template/ElopageBuys/add.ctp:9 #: Template/ElopageBuys/edit.ctp:9 Template/ElopageBuys/index.ctp:9 #: Template/ElopageBuys/index.ctp:30 Template/ElopageBuys/view.ctp:9 -#: Template/Migrations/add.ctp:9 Template/Migrations/edit.ctp:9 -#: Template/Migrations/index.ctp:9 Template/Migrations/index.ctp:20 -#: Template/Migrations/view.ctp:9 Template/OperatorTypes/add.ctp:9 #: Template/OperatorTypes/edit.ctp:9 Template/OperatorTypes/index.ctp:9 #: Template/OperatorTypes/index.ctp:23 Template/OperatorTypes/view.ctp:9 #: Template/OperatorTypes/view.ctp:43 Template/Operators/add.ctp:9 @@ -1011,7 +990,6 @@ msgstr "" #: Template/BlockchainTypes/add.ctp:23 Template/BlockchainTypes/edit.ctp:29 #: Template/CommunityProfiles/add.ctp:22 Template/CommunityProfiles/edit.ctp:28 #: Template/ElopageBuys/add.ctp:31 Template/ElopageBuys/edit.ctp:37 -#: Template/Migrations/add.ctp:21 Template/Migrations/edit.ctp:27 #: Template/OperatorTypes/add.ctp:24 Template/OperatorTypes/edit.ctp:30 #: Template/Operators/add.ctp:24 Template/Operators/edit.ctp:30 #: Template/Roles/add.ctp:21 Template/Roles/edit.ctp:27 @@ -1051,8 +1029,6 @@ msgstr "" #: Template/BlockchainTypes/edit.ctp:11 Template/BlockchainTypes/index.ctp:35 #: Template/CommunityProfiles/edit.ctp:11 #: Template/CommunityProfiles/index.ctp:33 Template/ElopageBuys/edit.ctp:11 -#: Template/ElopageBuys/index.ctp:51 Template/Migrations/edit.ctp:11 -#: Template/Migrations/index.ctp:31 Template/OperatorTypes/edit.ctp:11 #: Template/OperatorTypes/index.ctp:35 Template/OperatorTypes/view.ctp:54 #: Template/Operators/edit.ctp:11 Template/Operators/index.ctp:40 #: Template/Roles/edit.ctp:11 Template/Roles/index.ctp:31 @@ -1102,8 +1078,6 @@ msgstr "" #: Template/CommunityProfiles/index.ctp:33 #: Template/CommunityProfiles/view.ctp:11 Template/ElopageBuys/edit.ctp:13 #: Template/ElopageBuys/index.ctp:51 Template/ElopageBuys/view.ctp:11 -#: Template/Migrations/edit.ctp:13 Template/Migrations/index.ctp:31 -#: Template/Migrations/view.ctp:11 Template/OperatorTypes/edit.ctp:13 #: Template/OperatorTypes/index.ctp:35 Template/OperatorTypes/view.ctp:11 #: Template/OperatorTypes/view.ctp:54 Template/Operators/edit.ctp:13 #: Template/Operators/index.ctp:40 Template/Operators/view.ctp:11 @@ -1183,7 +1157,6 @@ msgstr "" #: Template/AddressTypes/view.ctp:83 Template/AdminErrors/index.ctp:39 #: Template/BlockchainTypes/index.ctp:33 #: Template/CommunityProfiles/index.ctp:31 Template/ElopageBuys/index.ctp:49 -#: Template/Migrations/index.ctp:29 Template/OperatorTypes/index.ctp:33 #: Template/OperatorTypes/view.ctp:52 Template/Operators/index.ctp:38 #: Template/Roles/index.ctp:29 Template/ServerUsers/index.ctp:41 #: Template/StateBalances/index.ctp:36 Template/StateCreated/index.ctp:43 @@ -1215,7 +1188,6 @@ msgstr "" #: Template/AddressTypes/view.ctp:84 Template/AdminErrors/index.ctp:41 #: Template/BlockchainTypes/index.ctp:34 #: Template/CommunityProfiles/index.ctp:32 Template/ElopageBuys/index.ctp:50 -#: Template/Migrations/index.ctp:30 Template/OperatorTypes/index.ctp:34 #: Template/OperatorTypes/view.ctp:53 Template/Operators/index.ctp:39 #: Template/Roles/index.ctp:30 Template/ServerUsers/index.ctp:42 #: Template/StateBalances/index.ctp:37 Template/StateCreated/index.ctp:44 @@ -1242,7 +1214,6 @@ msgstr "" #: Template/AddressTypes/index.ctp:45 Template/AdminErrors/index.ctp:50 #: Template/BlockchainTypes/index.ctp:43 #: Template/CommunityProfiles/index.ctp:41 Template/ElopageBuys/index.ctp:59 -#: Template/Migrations/index.ctp:39 Template/OperatorTypes/index.ctp:43 #: Template/Operators/index.ctp:48 Template/Roles/index.ctp:39 #: Template/ServerUsers/index.ctp:51 Template/StateBalances/index.ctp:46 #: Template/StateCreated/index.ctp:53 Template/StateErrors/index.ctp:47 @@ -1266,7 +1237,6 @@ msgstr "" #: Template/AddressTypes/index.ctp:46 Template/AdminErrors/index.ctp:51 #: Template/BlockchainTypes/index.ctp:44 #: Template/CommunityProfiles/index.ctp:42 Template/ElopageBuys/index.ctp:60 -#: Template/Migrations/index.ctp:40 Template/OperatorTypes/index.ctp:44 #: Template/Operators/index.ctp:49 Template/Roles/index.ctp:40 #: Template/ServerUsers/index.ctp:52 Template/StateBalances/index.ctp:47 #: Template/StateCreated/index.ctp:54 Template/StateErrors/index.ctp:48 @@ -1290,7 +1260,6 @@ msgstr "" #: Template/AddressTypes/index.ctp:48 Template/AdminErrors/index.ctp:53 #: Template/BlockchainTypes/index.ctp:46 #: Template/CommunityProfiles/index.ctp:44 Template/ElopageBuys/index.ctp:62 -#: Template/Migrations/index.ctp:42 Template/OperatorTypes/index.ctp:46 #: Template/Operators/index.ctp:51 Template/Roles/index.ctp:42 #: Template/ServerUsers/index.ctp:54 Template/StateBalances/index.ctp:49 #: Template/StateCreated/index.ctp:56 Template/StateErrors/index.ctp:50 @@ -1314,7 +1283,6 @@ msgstr "" #: Template/AddressTypes/index.ctp:49 Template/AdminErrors/index.ctp:54 #: Template/BlockchainTypes/index.ctp:47 #: Template/CommunityProfiles/index.ctp:45 Template/ElopageBuys/index.ctp:63 -#: Template/Migrations/index.ctp:43 Template/OperatorTypes/index.ctp:47 #: Template/Operators/index.ctp:52 Template/Roles/index.ctp:43 #: Template/ServerUsers/index.ctp:55 Template/StateBalances/index.ctp:50 #: Template/StateCreated/index.ctp:57 Template/StateErrors/index.ctp:51 @@ -1338,7 +1306,6 @@ msgstr "" #: Template/AddressTypes/index.ctp:51 Template/AdminErrors/index.ctp:56 #: Template/BlockchainTypes/index.ctp:49 #: Template/CommunityProfiles/index.ctp:47 Template/ElopageBuys/index.ctp:65 -#: Template/Migrations/index.ctp:45 Template/OperatorTypes/index.ctp:49 #: Template/Operators/index.ctp:54 Template/Roles/index.ctp:45 #: Template/ServerUsers/index.ctp:57 Template/StateBalances/index.ctp:52 #: Template/StateCreated/index.ctp:59 Template/StateErrors/index.ctp:53 @@ -1385,7 +1352,6 @@ msgstr "" #: Template/AddressTypes/view.ctp:32 Template/AddressTypes/view.ctp:41 #: Template/AddressTypes/view.ctp:68 Template/AdminErrors/view.ctp:46 #: Template/BlockchainTypes/view.ctp:32 Template/CommunityProfiles/view.ctp:24 -#: Template/ElopageBuys/view.ctp:32 Template/Migrations/view.ctp:20 #: Template/OperatorTypes/view.ctp:30 Template/OperatorTypes/view.ctp:39 #: Template/Operators/view.ctp:32 Template/Roles/view.ctp:24 #: Template/ServerUsers/view.ctp:36 Template/StateBalances/view.ctp:27 @@ -1875,35 +1841,6 @@ msgstr "" msgid "Community Server in Entwicklung" msgstr "" -#: Template/Migrations/add.ctp:10 Template/Migrations/edit.ctp:16 -#: Template/Migrations/view.ctp:12 -msgid "List Migrations" -msgstr "" - -#: Template/Migrations/add.ctp:16 -msgid "Add Migration" -msgstr "" - -#: Template/Migrations/edit.ctp:22 Template/Migrations/view.ctp:10 -msgid "Edit Migration" -msgstr "" - -#: Template/Migrations/index.ctp:10 Template/Migrations/view.ctp:13 -msgid "New Migration" -msgstr "" - -#: Template/Migrations/index.ctp:14 -msgid "Migrations" -msgstr "" - -#: Template/Migrations/view.ctp:11 -msgid "Delete Migration" -msgstr "" - -#: Template/Migrations/view.ctp:24 -msgid "Db Version" -msgstr "" - #: Template/OperatorTypes/add.ctp:10 Template/OperatorTypes/edit.ctp:16 #: Template/OperatorTypes/view.ctp:12 msgid "List Operator Types" diff --git a/community_server/src/Locale/default.pot b/community_server/src/Locale/default.pot index 88e11dd1e..0c9ada315 100644 --- a/community_server/src/Locale/default.pot +++ b/community_server/src/Locale/default.pot @@ -159,24 +159,6 @@ msgstr "" msgid "Gradido Transaktion fehlgeschlagen!" msgstr "" -#: Controller/MigrationsController.php:124 -#: Controller/MigrationsController.php:148 -msgid "The migration has been saved." -msgstr "" - -#: Controller/MigrationsController.php:128 -#: Controller/MigrationsController.php:152 -msgid "The migration could not be saved. Please, try again." -msgstr "" - -#: Controller/MigrationsController.php:169 -msgid "The migration has been deleted." -msgstr "" - -#: Controller/MigrationsController.php:171 -msgid "The migration could not be deleted. Please, try again." -msgstr "" - #: Controller/OperatorTypesController.php:54 #: Controller/OperatorTypesController.php:78 msgid "The operator type has been saved." @@ -883,11 +865,6 @@ msgstr "" #: Template/ElopageBuys/index.ctp:9 #: Template/ElopageBuys/index.ctp:30 #: Template/ElopageBuys/view.ctp:9 -#: Template/Migrations/add.ctp:9 -#: Template/Migrations/edit.ctp:9 -#: Template/Migrations/index.ctp:9 -#: Template/Migrations/index.ctp:20 -#: Template/Migrations/view.ctp:9 #: Template/OperatorTypes/add.ctp:9 #: Template/OperatorTypes/edit.ctp:9 #: Template/OperatorTypes/index.ctp:9 @@ -1102,8 +1079,6 @@ msgstr "" #: Template/CommunityProfiles/edit.ctp:28 #: Template/ElopageBuys/add.ctp:31 #: Template/ElopageBuys/edit.ctp:37 -#: Template/Migrations/add.ctp:21 -#: Template/Migrations/edit.ctp:27 #: Template/OperatorTypes/add.ctp:24 #: Template/OperatorTypes/edit.ctp:30 #: Template/Operators/add.ctp:24 @@ -1163,8 +1138,6 @@ msgstr "" #: Template/CommunityProfiles/index.ctp:33 #: Template/ElopageBuys/edit.ctp:11 #: Template/ElopageBuys/index.ctp:51 -#: Template/Migrations/edit.ctp:11 -#: Template/Migrations/index.ctp:31 #: Template/OperatorTypes/edit.ctp:11 #: Template/OperatorTypes/index.ctp:35 #: Template/OperatorTypes/view.ctp:54 @@ -1241,9 +1214,6 @@ msgstr "" #: Template/ElopageBuys/edit.ctp:13 #: Template/ElopageBuys/index.ctp:51 #: Template/ElopageBuys/view.ctp:11 -#: Template/Migrations/edit.ctp:13 -#: Template/Migrations/index.ctp:31 -#: Template/Migrations/view.ctp:11 #: Template/OperatorTypes/edit.ctp:13 #: Template/OperatorTypes/index.ctp:35 #: Template/OperatorTypes/view.ctp:11 @@ -1353,7 +1323,6 @@ msgstr "" #: Template/BlockchainTypes/index.ctp:33 #: Template/CommunityProfiles/index.ctp:31 #: Template/ElopageBuys/index.ctp:49 -#: Template/Migrations/index.ctp:29 #: Template/OperatorTypes/index.ctp:33 #: Template/OperatorTypes/view.ctp:52 #: Template/Operators/index.ctp:38 @@ -1403,7 +1372,6 @@ msgstr "" #: Template/BlockchainTypes/index.ctp:34 #: Template/CommunityProfiles/index.ctp:32 #: Template/ElopageBuys/index.ctp:50 -#: Template/Migrations/index.ctp:30 #: Template/OperatorTypes/index.ctp:34 #: Template/OperatorTypes/view.ctp:53 #: Template/Operators/index.ctp:39 @@ -1445,7 +1413,6 @@ msgstr "" #: Template/BlockchainTypes/index.ctp:43 #: Template/CommunityProfiles/index.ctp:41 #: Template/ElopageBuys/index.ctp:59 -#: Template/Migrations/index.ctp:39 #: Template/OperatorTypes/index.ctp:43 #: Template/Operators/index.ctp:48 #: Template/Roles/index.ctp:39 @@ -1477,7 +1444,6 @@ msgstr "" #: Template/BlockchainTypes/index.ctp:44 #: Template/CommunityProfiles/index.ctp:42 #: Template/ElopageBuys/index.ctp:60 -#: Template/Migrations/index.ctp:40 #: Template/OperatorTypes/index.ctp:44 #: Template/Operators/index.ctp:49 #: Template/Roles/index.ctp:40 @@ -1509,7 +1475,6 @@ msgstr "" #: Template/BlockchainTypes/index.ctp:46 #: Template/CommunityProfiles/index.ctp:44 #: Template/ElopageBuys/index.ctp:62 -#: Template/Migrations/index.ctp:42 #: Template/OperatorTypes/index.ctp:46 #: Template/Operators/index.ctp:51 #: Template/Roles/index.ctp:42 @@ -1541,7 +1506,6 @@ msgstr "" #: Template/BlockchainTypes/index.ctp:47 #: Template/CommunityProfiles/index.ctp:45 #: Template/ElopageBuys/index.ctp:63 -#: Template/Migrations/index.ctp:43 #: Template/OperatorTypes/index.ctp:47 #: Template/Operators/index.ctp:52 #: Template/Roles/index.ctp:43 @@ -1573,7 +1537,6 @@ msgstr "" #: Template/BlockchainTypes/index.ctp:49 #: Template/CommunityProfiles/index.ctp:47 #: Template/ElopageBuys/index.ctp:65 -#: Template/Migrations/index.ctp:45 #: Template/OperatorTypes/index.ctp:49 #: Template/Operators/index.ctp:54 #: Template/Roles/index.ctp:45 @@ -1632,7 +1595,6 @@ msgstr "" #: Template/BlockchainTypes/view.ctp:32 #: Template/CommunityProfiles/view.ctp:24 #: Template/ElopageBuys/view.ctp:32 -#: Template/Migrations/view.ctp:20 #: Template/OperatorTypes/view.ctp:30 #: Template/OperatorTypes/view.ctp:39 #: Template/Operators/view.ctp:32 @@ -2194,38 +2156,6 @@ msgstr "" msgid "Community Server in Entwicklung" msgstr "" -#: Template/Migrations/add.ctp:10 -#: Template/Migrations/edit.ctp:16 -#: Template/Migrations/view.ctp:12 -msgid "List Migrations" -msgstr "" - -#: Template/Migrations/add.ctp:16 -msgid "Add Migration" -msgstr "" - -#: Template/Migrations/edit.ctp:22 -#: Template/Migrations/view.ctp:10 -msgid "Edit Migration" -msgstr "" - -#: Template/Migrations/index.ctp:10 -#: Template/Migrations/view.ctp:13 -msgid "New Migration" -msgstr "" - -#: Template/Migrations/index.ctp:14 -msgid "Migrations" -msgstr "" - -#: Template/Migrations/view.ctp:11 -msgid "Delete Migration" -msgstr "" - -#: Template/Migrations/view.ctp:24 -msgid "Db Version" -msgstr "" - #: Template/OperatorTypes/add.ctp:10 #: Template/OperatorTypes/edit.ctp:16 #: Template/OperatorTypes/view.ctp:12 diff --git a/community_server/src/Model/Entity/Migration.php b/community_server/src/Model/Entity/Migration.php deleted file mode 100644 index 700136cf8..000000000 --- a/community_server/src/Model/Entity/Migration.php +++ /dev/null @@ -1,26 +0,0 @@ - true, - ]; -} diff --git a/community_server/src/Model/Table/MigrationsTable.php b/community_server/src/Model/Table/MigrationsTable.php deleted file mode 100644 index b5cb42154..000000000 --- a/community_server/src/Model/Table/MigrationsTable.php +++ /dev/null @@ -1,56 +0,0 @@ -setTable('migrations'); - $this->setDisplayField('id'); - $this->setPrimaryKey('id'); - } - - /** - * Default validation rules. - * - * @param \Cake\Validation\Validator $validator Validator instance. - * @return \Cake\Validation\Validator - */ - public function validationDefault(Validator $validator) - { - $validator - ->nonNegativeInteger('id') - ->allowEmptyString('id', null, 'create'); - - $validator - ->integer('db_version') - ->allowEmptyString('db_version'); - - return $validator; - } -} diff --git a/community_server/src/Template/Migrations/add.ctp b/community_server/src/Template/Migrations/add.ctp deleted file mode 100644 index 94a555733..000000000 --- a/community_server/src/Template/Migrations/add.ctp +++ /dev/null @@ -1,23 +0,0 @@ - - -
| = $this->Paginator->sort('id') ?> | -= $this->Paginator->sort('db_version') ?> | -= __('Actions') ?> | -
|---|---|---|
| = $this->Number->format($migration->id) ?> | -= $this->Number->format($migration->db_version) ?> | -- = $this->Html->link(__('View'), ['action' => 'view', $migration->id]) ?> - = $this->Html->link(__('Edit'), ['action' => 'edit', $migration->id]) ?> - = $this->Form->postLink(__('Delete'), ['action' => 'delete', $migration->id], ['confirm' => __('Are you sure you want to delete # {0}?', $migration->id)]) ?> - | -
= $this->Paginator->counter(['format' => __('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')]) ?>
-Migrate from Version = $db_version ?>
- -= json_encode($result) ?>
- -= $this->Html->link('Back to Dashboard', ['controller' => 'Dashboard', 'action' => 'index']) ?>
- diff --git a/community_server/src/Template/Migrations/view.ctp b/community_server/src/Template/Migrations/view.ctp deleted file mode 100644 index dc4c5ded3..000000000 --- a/community_server/src/Template/Migrations/view.ctp +++ /dev/null @@ -1,28 +0,0 @@ - - -| = __('Id') ?> | -= $this->Number->format($migration->id) ?> | -
|---|---|
| = __('Db Version') ?> | -= $this->Number->format($migration->db_version) ?> | -