addConnection([ 'driver' => 'sqlite', 'database' => __DIR__ . '/database.sqlite', ]); $capsule->setAsGlobal(); if (!Capsule::schema()->hasTable('products')) { Capsule::schema()->create('products', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->integer('skuID')->unique(); $table->integer('agilityID'); $table->integer('availableQuantity'); $table->integer('stock'); $table->json('categories'); $table->string('image'); $table->string('subTitle'); $table->string('variantCode'); $table->string('modelCode'); $table->string('url'); $table->boolean('starred')->default(false); $table->timestamps(); }); } if (!Capsule::schema()->hasTable('prices')) { Capsule::schema()->create('prices', function (Blueprint $table) { $table->increments('id'); $table->foreignId('product_id'); $table->float('price'); $table->float('productStandardPrice'); $table->float('lowestProductPrice30Days'); $table->timestamps(); }); }