This repository has been archived by the owner on Dec 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add some fields in rents & rentprices #8
- Loading branch information
Showing
8 changed files
with
308 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
database/migrations/2015_05_14_215734_add_more_rent_data.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class AddMoreRentData extends Migration { | ||
|
||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::table('rents', function(Blueprint $table) | ||
{ | ||
$table->boolean('buildingHLM')->nullable()->after('buildingIndividual'); | ||
$table->double('surfaceM2')->default(0.0)->after('buildingHLM'); | ||
$table->integer('roomsCount')->default(0)->after('surfaceM2'); | ||
$table->boolean('kitchenRoom')->nullable()->after('roomsCount'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::table('rents', function(Blueprint $table) | ||
{ | ||
$table->removeColumn('buildingHLM'); | ||
$table->removeColumn('roomsCount'); | ||
$table->removeColumn('surfaceM2'); | ||
$table->removeColumn('kitchenRoom'); | ||
}); | ||
} | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
database/migrations/2015_05_14_220531_add_more_rentprice_data.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class AddMoreRentpriceData extends Migration { | ||
|
||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::table('rent_prices', function(Blueprint $table) | ||
{ | ||
$table->integer('month')->after('year')->default(0); | ||
$table->double('loads')->after('price')->default(0.0); | ||
$table->double('loadsOther')->default(0.0)->after('loads'); | ||
$table->string('loadsOtherText')->nullable()->after('loadsOther'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::table('rent_prices', function(Blueprint $table) | ||
{ | ||
$table->removeColumn('month'); | ||
$table->removeColumn('loads'); | ||
$table->removeColumn('loadsOther'); | ||
$table->removeColumn('loadsOtherText'); | ||
}); | ||
} | ||
|
||
} |
Oops, something went wrong.