Merge branch 'migrations' into dev

This commit is contained in:
Lukas Halbritter
2018-09-09 10:56:50 +02:00
3 changed files with 67 additions and 0 deletions
@@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddFactorFieldToIOTypesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('i_o_types', function (Blueprint $table) {
$table->tinyInteger('factor');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('i_o_types', function (Blueprint $table) {
$table->dropColumn('factor');
});
}
}
+19
View File
@@ -0,0 +1,19 @@
<?php
use Illuminate\Database\Seeder;
class IOTypesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('i_o_types')->insert([
['name' => 'Einnahme', 'factor' => 1],
['name' => 'Ausgabe', 'factor' => -1]
]);
}
}
+16
View File
@@ -0,0 +1,16 @@
<?php
use Illuminate\Database\Seeder;
class ScopesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
}
}