Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save devmeireles/018fc79dde72aa0373bfb3d2a82238b9 to your computer and use it in GitHub Desktop.
Save devmeireles/018fc79dde72aa0373bfb3d2a82238b9 to your computer and use it in GitHub Desktop.
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Eloquent\SoftDeletes;
class CreateProductosTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('productos', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 128)->unique();
$table->string('slug', 256);
$table->text('description');
$table->decimal('price', 8, 2);
$table->decimal('amount', 8, 2);
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('productos');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment