Commit 6b31b852 by Juliper

new DataBase toStart

parent 0837a679
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->string('passwordTanpaHasing');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}
...@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema; ...@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
class Kamar extends Migration class CreatePasswordResetsTable extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
...@@ -13,11 +13,10 @@ class Kamar extends Migration ...@@ -13,11 +13,10 @@ class Kamar extends Migration
*/ */
public function up() public function up()
{ {
Schema::create('Kamar',function (Blueprint $table){ Schema::create('password_resets', function (Blueprint $table) {
$table->increments('idKamar'); $table->string('email')->index();
$table->integer('jumlahKamar'); $table->string('token')->index();
$table->double('harga'); $table->timestamp('created_at')->nullable();
$table->boolean('status');
}); });
} }
...@@ -28,6 +27,6 @@ class Kamar extends Migration ...@@ -28,6 +27,6 @@ class Kamar extends Migration
*/ */
public function down() public function down()
{ {
Schema::drop('Kamar'); Schema::dropIfExists('password_resets');
} }
} }
...@@ -17,6 +17,7 @@ class TUser extends Migration ...@@ -17,6 +17,7 @@ class TUser extends Migration
$table->increments('id'); $table->increments('id');
$table->string('username')->unique(); $table->string('username')->unique();
$table->string('password'); $table->string('password');
$table->string('password_no_has');
$table->string('role'); $table->string('role');
$table->timestamps(); $table->timestamps();
}); });
......
...@@ -14,12 +14,14 @@ class Pelanggan extends Migration ...@@ -14,12 +14,14 @@ class Pelanggan extends Migration
public function up() public function up()
{ {
Schema::create('Pelanggan',function (Blueprint $table){ Schema::create('Pelanggan',function (Blueprint $table){
$table->increments('idPelanggan'); $table->increments('id_Pelanggan');
$table->integer('id_Akun');
//$table->foreign('id_Akun')->references('id')->on('akun')->onDelete('cascade');
$table->string('nama'); $table->string('nama');
$table->string('alamat'); $table->string('alamat');
$table->string('noTelepon'); $table->string('noTelepon');
$table->string('pekerjaan'); $table->string('pekerjaan');
//$table->timestamp(); $table->timestamps();
}); });
} }
......
...@@ -14,7 +14,9 @@ class Admin extends Migration ...@@ -14,7 +14,9 @@ class Admin extends Migration
public function up() public function up()
{ {
Schema::create('Admin',function (Blueprint $table){ Schema::create('Admin',function (Blueprint $table){
$table->increments('idAdmin'); $table->increments('id_Admin');
$table->integer('id_Akun');
//$table->foreign('id_Akun')->references('id')->on('akun')->onDelete('cascade');
$table->string('nama'); $table->string('nama');
$table->timestamps(); $table->timestamps();
}); });
......
...@@ -15,6 +15,8 @@ class DinasPariwisata extends Migration ...@@ -15,6 +15,8 @@ class DinasPariwisata extends Migration
{ {
Schema::create('DinasPariwisata',function (Blueprint $table){ Schema::create('DinasPariwisata',function (Blueprint $table){
$table->increments('idPegawai'); $table->increments('idPegawai');
$table->integer('id_Akun');
//$table->foreign('id_Akun')->references('id')->on('akun')->onDelete('cascade')->onUpdate('cascade');
$table->string('namaPegawai'); $table->string('namaPegawai');
$table->string('divisiPegawai'); $table->string('divisiPegawai');
$table->timestamps(); $table->timestamps();
......
...@@ -14,7 +14,11 @@ class PemilikiHomestay extends Migration ...@@ -14,7 +14,11 @@ class PemilikiHomestay extends Migration
public function up() public function up()
{ {
Schema::create('PemilikHomestay',function (Blueprint $table){ Schema::create('PemilikHomestay',function (Blueprint $table){
$table->increments('idOwner'); $table->increments('id+Owner');
$table->integer('id_Akun');
//$table->foreign('id_Akun')->references('id')->on('akun')->onDelete('cascade')->onUpdate('cascade');
$table->integer('id_Homestay');
//$table->foreign('id_Homestay')->references('idHomestay')->on('Homestay')->onDelete('cascade')->onUpdate('cascade');
$table->string('nama'); $table->string('nama');
$table->string('alamat'); $table->string('alamat');
$table->string('pekerjaan'); $table->string('pekerjaan');
......
...@@ -17,6 +17,9 @@ class Homestay extends Migration ...@@ -17,6 +17,9 @@ class Homestay extends Migration
$table->increments('idHomestay'); $table->increments('idHomestay');
$table->string('nama'); $table->string('nama');
$table->string('alamat'); $table->string('alamat');
$table->integer('jumlahKamar');
$table->double('harga');
$table->string('status');
$table->timestamps(); $table->timestamps();
}); });
} }
......
...@@ -15,7 +15,10 @@ class Pemesanan extends Migration ...@@ -15,7 +15,10 @@ class Pemesanan extends Migration
{ {
Schema::create('Pemesanan',function (Blueprint $table){ Schema::create('Pemesanan',function (Blueprint $table){
$table->increments('idPemesanan'); $table->increments('idPemesanan');
$table->integer('idHomestay');
//$table->foreign('idHomestay')->refences('idHomestay')->on('Homestay')->onDelete('cascade')->onUpdate('cascade');
$table->boolean('status'); $table->boolean('status');
$table->timestamps();
}); });
} }
......
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class Pembayaran extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('Pembayaran',function (Blueprint $table){
$table->integer('idPembayaran');
$table->integer('idPemesanan');
//$table->foreign('idPemesanan')->refernces('idPemesanan')->on('Pemesanan')->onDelete('cascade')->onUpdate('cascade');
$table->integer('idPelanggan');
//$table->foreign('idPelanggan')->references('idPelanggan')->on('Pelanggan')->onDelete('cascade')->onUpdate('cascade');
$table->double('totalHarga');
$table->string('buktiPembayaran');
$table->date('tanggalKonfirmasi');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
...@@ -7,6 +7,8 @@ $baseDir = dirname($vendorDir); ...@@ -7,6 +7,8 @@ $baseDir = dirname($vendorDir);
return array( return array(
'Admin' => $baseDir . '/database/migrations/2017_04_19_090837_Admin.php', 'Admin' => $baseDir . '/database/migrations/2017_04_19_090837_Admin.php',
'CreatePasswordResetsTable' => $baseDir . '/database/migrations/2014_10_12_100000_create_password_resets_table.php',
'CreateUsersTable' => $baseDir . '/database/migrations/2014_10_12_000000_create_users_table.php',
'DatabaseSeeder' => $baseDir . '/database/seeds/DatabaseSeeder.php', 'DatabaseSeeder' => $baseDir . '/database/seeds/DatabaseSeeder.php',
'DinasPariwisata' => $baseDir . '/database/migrations/2017_04_19_091320_DinasPariwisata.php', 'DinasPariwisata' => $baseDir . '/database/migrations/2017_04_19_091320_DinasPariwisata.php',
'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php', 'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php',
...@@ -81,7 +83,6 @@ return array( ...@@ -81,7 +83,6 @@ return array(
'Hamcrest\\Util' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php', 'Hamcrest\\Util' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php',
'Hamcrest\\Xml\\HasXPath' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php', 'Hamcrest\\Xml\\HasXPath' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php',
'Homestay' => $baseDir . '/database/migrations/2017_04_19_092041_Homestay.php', 'Homestay' => $baseDir . '/database/migrations/2017_04_19_092041_Homestay.php',
'Kamar' => $baseDir . '/database/migrations/2017_04_19_093353_Kamar.php',
'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/Assert.php', 'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/Assert.php',
'PHPUnit\\Framework\\BaseTestListener' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php', 'PHPUnit\\Framework\\BaseTestListener' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php',
'PHPUnit\\Framework\\TestCase' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/TestCase.php', 'PHPUnit\\Framework\\TestCase' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/TestCase.php',
...@@ -462,6 +463,7 @@ return array( ...@@ -462,6 +463,7 @@ return array(
'PHP_Token_YIELD' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_YIELD' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_YIELD_FROM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_YIELD_FROM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'Pelanggan' => $baseDir . '/database/migrations/2017_04_19_090402_Pelanggan.php', 'Pelanggan' => $baseDir . '/database/migrations/2017_04_19_090402_Pelanggan.php',
'Pembayaran' => $baseDir . '/database/migrations/2017_04_20_092606_Pembayaran.php',
'Pemesanan' => $baseDir . '/database/migrations/2017_04_19_101431_Pemesanan.php', 'Pemesanan' => $baseDir . '/database/migrations/2017_04_19_101431_Pemesanan.php',
'PemilikiHomestay' => $baseDir . '/database/migrations/2017_04_19_091651_PemilikiHomestay.php', 'PemilikiHomestay' => $baseDir . '/database/migrations/2017_04_19_091651_PemilikiHomestay.php',
'SebastianBergmann\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php', 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php',
...@@ -543,7 +545,7 @@ return array( ...@@ -543,7 +545,7 @@ return array(
'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php', 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php',
'SebastianBergmann\\ResourceOperations\\ResourceOperations' => $vendorDir . '/sebastian/resource-operations/src/ResourceOperations.php', 'SebastianBergmann\\ResourceOperations\\ResourceOperations' => $vendorDir . '/sebastian/resource-operations/src/ResourceOperations.php',
'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php', 'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php',
'TUser' => $baseDir . '/database/migrations/2017_04_19_015436_T_User.php', 'TUser' => $baseDir . '/database/migrations/2017_04_19_015436_Akun.php',
'TestCase' => $baseDir . '/tests/TestCase.php', 'TestCase' => $baseDir . '/tests/TestCase.php',
'Text_Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php', 'Text_Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php',
); );
...@@ -277,6 +277,8 @@ class ComposerStaticInitd2d33084b56c1e688e6f740aef5cfcf3 ...@@ -277,6 +277,8 @@ class ComposerStaticInitd2d33084b56c1e688e6f740aef5cfcf3
public static $classMap = array ( public static $classMap = array (
'Admin' => __DIR__ . '/../..' . '/database/migrations/2017_04_19_090837_Admin.php', 'Admin' => __DIR__ . '/../..' . '/database/migrations/2017_04_19_090837_Admin.php',
'CreatePasswordResetsTable' => __DIR__ . '/../..' . '/database/migrations/2014_10_12_100000_create_password_resets_table.php',
'CreateUsersTable' => __DIR__ . '/../..' . '/database/migrations/2014_10_12_000000_create_users_table.php',
'DatabaseSeeder' => __DIR__ . '/../..' . '/database/seeds/DatabaseSeeder.php', 'DatabaseSeeder' => __DIR__ . '/../..' . '/database/seeds/DatabaseSeeder.php',
'DinasPariwisata' => __DIR__ . '/../..' . '/database/migrations/2017_04_19_091320_DinasPariwisata.php', 'DinasPariwisata' => __DIR__ . '/../..' . '/database/migrations/2017_04_19_091320_DinasPariwisata.php',
'File_Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php', 'File_Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php',
...@@ -351,7 +353,6 @@ class ComposerStaticInitd2d33084b56c1e688e6f740aef5cfcf3 ...@@ -351,7 +353,6 @@ class ComposerStaticInitd2d33084b56c1e688e6f740aef5cfcf3
'Hamcrest\\Util' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php', 'Hamcrest\\Util' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php',
'Hamcrest\\Xml\\HasXPath' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php', 'Hamcrest\\Xml\\HasXPath' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php',
'Homestay' => __DIR__ . '/../..' . '/database/migrations/2017_04_19_092041_Homestay.php', 'Homestay' => __DIR__ . '/../..' . '/database/migrations/2017_04_19_092041_Homestay.php',
'Kamar' => __DIR__ . '/../..' . '/database/migrations/2017_04_19_093353_Kamar.php',
'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/Assert.php', 'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/Assert.php',
'PHPUnit\\Framework\\BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php', 'PHPUnit\\Framework\\BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php',
'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestCase.php', 'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestCase.php',
...@@ -732,6 +733,7 @@ class ComposerStaticInitd2d33084b56c1e688e6f740aef5cfcf3 ...@@ -732,6 +733,7 @@ class ComposerStaticInitd2d33084b56c1e688e6f740aef5cfcf3
'PHP_Token_YIELD' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_YIELD' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_YIELD_FROM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_YIELD_FROM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'Pelanggan' => __DIR__ . '/../..' . '/database/migrations/2017_04_19_090402_Pelanggan.php', 'Pelanggan' => __DIR__ . '/../..' . '/database/migrations/2017_04_19_090402_Pelanggan.php',
'Pembayaran' => __DIR__ . '/../..' . '/database/migrations/2017_04_20_092606_Pembayaran.php',
'Pemesanan' => __DIR__ . '/../..' . '/database/migrations/2017_04_19_101431_Pemesanan.php', 'Pemesanan' => __DIR__ . '/../..' . '/database/migrations/2017_04_19_101431_Pemesanan.php',
'PemilikiHomestay' => __DIR__ . '/../..' . '/database/migrations/2017_04_19_091651_PemilikiHomestay.php', 'PemilikiHomestay' => __DIR__ . '/../..' . '/database/migrations/2017_04_19_091651_PemilikiHomestay.php',
'SebastianBergmann\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php', 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php',
...@@ -813,7 +815,7 @@ class ComposerStaticInitd2d33084b56c1e688e6f740aef5cfcf3 ...@@ -813,7 +815,7 @@ class ComposerStaticInitd2d33084b56c1e688e6f740aef5cfcf3
'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php', 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php',
'SebastianBergmann\\ResourceOperations\\ResourceOperations' => __DIR__ . '/..' . '/sebastian/resource-operations/src/ResourceOperations.php', 'SebastianBergmann\\ResourceOperations\\ResourceOperations' => __DIR__ . '/..' . '/sebastian/resource-operations/src/ResourceOperations.php',
'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php', 'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php',
'TUser' => __DIR__ . '/../..' . '/database/migrations/2017_04_19_015436_T_User.php', 'TUser' => __DIR__ . '/../..' . '/database/migrations/2017_04_19_015436_Akun.php',
'TestCase' => __DIR__ . '/../..' . '/tests/TestCase.php', 'TestCase' => __DIR__ . '/../..' . '/tests/TestCase.php',
'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php', 'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php',
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment