1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- // Copyright 2019 Hackware SpA <human@hackware.cl>
- // This file is part of "Hackware Web Services Payment" and licensed under
- // the terms of the GNU Affero General Public License version 3, or (at your
- // option) a later version. You should have received a copy of this license
- // along with the software. If not, see <https://www.gnu.org/licenses/>.
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreatePaymentsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('payments', function (Blueprint $table) {
- $table->uuid('uuid')->primary();
- $table->string('user_uid', 100);
- $table->string('gateway', 100);
- $table->char('currency', 3);
- $table->integer('amount');
- $table->string('description', 255)->nullable();
- $table->text('detail')->nullable();
- $table->string('status', 9); // pending|completed|aborted
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('payments');
- }
- }
|