Added the migration for the event access codes table to contain a usage count
This commit is contained in:
parent
b11c3fa09c
commit
3738c912ea
|
|
@ -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');
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue