12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- // Copyright 2019 Hackware SpA <human@hackware.cl>
- // This file is part of "Hackware Web Services Wallet" 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 CreateCurrenciesTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('currencies', function (Blueprint $table) {
- $table->increments('id');
- $table->char('code', 3)->index();
- $table->decimal('rate', 12, 6);
- $table->decimal('step', 8, 4);
- $table->timestamp('created_at');
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('currencies');
- }
- }
|