Moving migrations and scripts

This commit is contained in:
gamonoid
2017-09-04 06:59:14 +02:00
parent 737b392d0a
commit ed36ae0672
15 changed files with 58 additions and 97 deletions

View File

@@ -0,0 +1,24 @@
<?php
namespace Classes\Migration;
use Model\Setting;
class v20170310_190401_add_timesheet_changes extends AbstractMigration{
public function up(){
$setting = new Setting();
$setting->Load("name = ?", array('System: Time-sheet Entry Start and End time Required'));
if(empty($setting->id)){
$setting->name = 'System: Time-sheet Entry Start and End time Required';
$setting->value = 1;
$setting->description = 'Select 0 if you only need to store the time spend in time sheets';
$setting->meta = '["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]';
$setting->Save();
}
}
public function down(){
}
}