id(); $table->string( 'event', 32 )->not_null(); $table->string( 'session_id', 64 )->not_null(); $table->foreign_id( 'product_id' )->nullable(); $table->integer( 'quantity' )->nullable(); $table->decimal( 'total', 12, 2 )->nullable(); $table->string( 'currency', 8 )->nullable(); $table->datetime( 'created_at' )->not_null(); $table->index( 'session_id' ); $table->index( 'created_at' ); }); } /** * Reverse the migration. * * @return void */ public function down() { Schema::drop_if_exists( 'aisentic_wc_sales_events' ); } }