db seeder

This commit is contained in:
2023-03-03 15:43:38 +01:00
parent 3d13369e05
commit 798996b615
7 changed files with 124 additions and 39 deletions

View File

@@ -12,17 +12,16 @@ return new class extends Migration
*/
public function up(): void
{
Schema::create('clients', function (Blueprint $table) {
Schema::create('clients', function (Blueprint $table){
$table->engine = 'InnoDB';
$table->bigIncrements('id')->unsigned();
$table->string('nom')->nullable();
$table->string('prenom')->nullable();
$table->json('adresse')->default(new Expression('(JSON_OBJECT())'));
$table->string("prenom")->nullable();
$table->json("adresse")->default(new Expression('(JSON_OBJECT())'));
$table->timestamps();
$table->index("nom");
$table->index("prenom");
});
@@ -33,6 +32,6 @@ return new class extends Migration
*/
public function down(): void
{
Schema::dropIfexists('clients');
Schema::dropIfExists('clients');
}
};