Added the migration for the event access codes table to contain a usage count

This commit is contained in:
Etienne Marais 2019-02-13 15:04:53 +02:00
parent b11c3fa09c
commit 3738c912ea
No known key found for this signature in database
GPG Key ID: 5CE3285D17AE9F29
1 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddAmountsFieldToEventAccessCodes extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('event_access_codes', function (Blueprint $table) {
$table->unsignedInteger('usage_count')->default(0)->after('code');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('event_access_codes', function (Blueprint $table) {
$table->dropColumn('usage_count');
});
}
}