diff --git a/app/Http/Controllers/MoonsController.php b/app/Http/Controllers/MoonsController.php index cd4f140fb..4fae9c448 100644 --- a/app/Http/Controllers/MoonsController.php +++ b/app/Http/Controllers/MoonsController.php @@ -22,7 +22,7 @@ class MoonsController extends Controller //Update the prices for the moon $moonCalc->FetchNewPrices(); //get all of the moons from the database - $moons = DB::table('moons')->get(); + $moons = DB::table('Moons')->get(); //declare the html variable and set it to null $html = ''; foreach($moons as $moon) { diff --git a/app/Moon.php b/app/Moon.php index 06fe5765d..dc2dfcff8 100644 --- a/app/Moon.php +++ b/app/Moon.php @@ -7,11 +7,11 @@ use Illuminate\Database\Eloquent\Model; class Moon extends Model { // Table Name - protected $table = 'moons'; + protected $table = 'Moons'; //Primary Key public $primaryKey = 'id'; // Timestamps - public $timestamps = 'true'; + public $timestamps = 'false'; } diff --git a/app/Price.php b/app/Price.php index f09075190..c837094ba 100644 --- a/app/Price.php +++ b/app/Price.php @@ -13,5 +13,5 @@ class Price extends Model public $primaryKey = 'id'; // Timestamps - public $timestamps = 'true'; + public $timestamps = 'false'; } diff --git a/database/migrations/2018_10_06_220248_create_moons_table.php b/database/migrations/2018_10_06_220248_create_moons_table.php index 983dae529..2af03568c 100644 --- a/database/migrations/2018_10_06_220248_create_moons_table.php +++ b/database/migrations/2018_10_06_220248_create_moons_table.php @@ -13,7 +13,7 @@ class CreateMoonsTable extends Migration */ public function up() { - Schema::create('moons', function (Blueprint $table) { + Schema::create('Moons', function (Blueprint $table) { $table->increments('id'); $table->string('Region'); $table->string('System'); @@ -30,7 +30,6 @@ class CreateMoonsTable extends Migration $table->integer('FourthQuantity')->default('0'); $table->string('RentalCorp')->default('0'); $table->integer('RentalEnd')->default('0'); - $table->timestamps(); }); } @@ -41,6 +40,6 @@ class CreateMoonsTable extends Migration */ public function down() { - Schema::dropIfExists('moons'); + Schema::dropIfExists('Moons'); } } diff --git a/database/migrations/2018_10_24_032959_create_prices_table.php b/database/migrations/2018_10_24_032959_create_prices_table.php index 533f872d2..9050a7385 100644 --- a/database/migrations/2018_10_24_032959_create_prices_table.php +++ b/database/migrations/2018_10_24_032959_create_prices_table.php @@ -19,7 +19,6 @@ class CreatePricesTable extends Migration $table->integer('ItemId'); $table->decimal('Price', 20, 2); $table->string('Time'); - $table->timestamps(); }); } @@ -30,6 +29,6 @@ class CreatePricesTable extends Migration */ public function down() { - Schema::dropIfExists('prices'); + Schema::dropIfExists('Prices'); } } diff --git a/database/migrations/2018_10_24_033246_create_oreprices_table.php b/database/migrations/2018_10_24_033246_create_oreprices_table.php index c3a8005db..9b917cb1c 100644 --- a/database/migrations/2018_10_24_033246_create_oreprices_table.php +++ b/database/migrations/2018_10_24_033246_create_oreprices_table.php @@ -13,7 +13,7 @@ class CreateOrepricesTable extends Migration */ public function up() { - Schema::create('oreprices', function (Blueprint $table) { + Schema::create('OrePrices', function (Blueprint $table) { $table->increments('id'); $table->string('Name'); $table->integer('ItemId'); @@ -32,6 +32,6 @@ class CreateOrepricesTable extends Migration */ public function down() { - Schema::dropIfExists('oreprices'); + Schema::dropIfExists('OrePrices'); } } diff --git a/database/migrations/2018_10_24_033452_create_config_table.php b/database/migrations/2018_10_24_033452_create_config_table.php index ffc4a73d4..e177d6716 100644 --- a/database/migrations/2018_10_24_033452_create_config_table.php +++ b/database/migrations/2018_10_24_033452_create_config_table.php @@ -13,7 +13,7 @@ class CreateConfigTable extends Migration */ public function up() { - Schema::create('config', function (Blueprint $table) { + Schema::create('Config', function (Blueprint $table) { $table->decimal('RentalTax', 5,2); $table->decimal('AllyRentalTax', 5, 2); $table->decimal('RefineRate', 5, 2); @@ -28,6 +28,6 @@ class CreateConfigTable extends Migration */ public function down() { - Schema::dropIfExists('config'); + Schema::dropIfExists('Config'); } } diff --git a/database/seeds/ItemComposition.sql b/database/seeds/ItemComposition.sql index cd92b089c..d8654c190 100644 --- a/database/seeds/ItemComposition.sql +++ b/database/seeds/ItemComposition.sql @@ -109,10 +109,6 @@ INSERT INTO `item_composition` (`Name`, `ItemId`, `m3Size`, `BatchSize`, `Tritan ('Loparite', 45512, '10.00', 100, 0, 0, 0, 0, 100, 200, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 20, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0), ('Ytterbite', 45513, '10.00', 100, 0, 0, 0, 0, 50, 100, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 20, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22); --- --- Indexes for dumped tables --- - -- -- Indexes for table `ItemComposition` -- diff --git a/database/seeds/Moons.sql b/database/seeds/Moons.sql index d91317bda..b89df6a66 100644 --- a/database/seeds/Moons.sql +++ b/database/seeds/Moons.sql @@ -26,7 +26,7 @@ SET time_zone = "+00:00"; -- Table structure for table `Moons` -- -CREATE TABLE IF NOT EXISTS `moons` ( +CREATE TABLE IF NOT EXISTS `Moons` ( `id` int(10) NOT NULL, `System` varchar(10) DEFAULT NULL, `Planet` varchar(10) DEFAULT NULL, @@ -48,7 +48,7 @@ CREATE TABLE IF NOT EXISTS `moons` ( -- Dumping data for table `Moons` -- -INSERT INTO `moons` (`id`, `System`, `Planet`, `Moon`, `StructureName`, `FirstOre`, `FirstQuantity`, `SecondOre`, `SecondQuantity`, `ThirdOre`, `ThirdQuantity`, `FourthOre`, `FourthQuantity`, `RentalCorp`, `RentalEnd`) VALUES +INSERT INTO `Moons` (`id`, `System`, `Planet`, `Moon`, `StructureName`, `FirstOre`, `FirstQuantity`, `SecondOre`, `SecondQuantity`, `ThirdOre`, `ThirdQuantity`, `FourthOre`, `FourthQuantity`, `RentalCorp`, `RentalEnd`) VALUES (50, 'LN-56V', '3', '1', 'No Name', 'Cubic Bistot', 35, 'Stable Veldspar', 35, 'Sylvite', 10, 'Zircon', 20, 'HYPNO', 1533081600), (52, 'LN-56V', '5', '7', '5-7', 'Loparite', 21, 'Monazite', 20, 'Pellucid Crokite', 31, 'Scintillating Hemorphite', 29, 'UOS', 1515715200), (53, 'LN-56V', '5', '15', 'PUB', 'Carnotite', 25, 'Opulent Pyroxeres', 45, 'Zircon', 31, 'None', 0, 'HYPNO', 1536624000), @@ -84,21 +84,6 @@ INSERT INTO `moons` (`id`, `System`, `Planet`, `Moon`, `StructureName`, `FirstOr (83, 'B-A587', '6', '6', 'No Name', 'Chromite', 22, 'Opulent Pyroxeres', 17, 'Platinoid Omber', 17, 'Ytterbite', 44, NULL, NULL), (84, 'LN-56V', '4', '8', 'No Name', 'Dazzling Spodumain', 10, 'Flawless Arkonor', 32, 'Glossy Scordite', 29, 'Zircon', 29, NULL, NULL); --- --- Indexes for dumped tables --- - --- --- Indexes for table `Moons` --- -ALTER TABLE `moons` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `id` (`id`); - --- --- AUTO_INCREMENT for dumped tables --- - -- -- AUTO_INCREMENT for table `Moons` --