Skip to content

Commit

Permalink
feat: Add migration for creating products table
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] committed Mar 11, 2024
1 parent 1ca198e commit f98ebcf
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions database/migrations/2023_04_01_000000_create_products_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProductsTable extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::create('products', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('description');
$table->decimal('price', 8, 2);
$table->string('category');
$table->integer('inventory_count');
$table->timestamps();
});
}

/**
* Reverse the migrations.
*/
public function down()
{
Schema::dropIfExists('products');
}
}

0 comments on commit f98ebcf

Please sign in to comment.