Completed
Push — master ( a54cfa...dab35b )
by Nur
09:38
created

CreateMasterCurrenciesTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 20
dl 0
loc 38
c 1
b 0
f 1
rs 10
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateMasterCurrenciesTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('tm_currencies', function (Blueprint $table) {
17
            $table->bigIncrements('id');
18
            $table->integer('priority')->nullable()->default(100);
19
            $table->string('iso_code', 255)->nullable();
20
            $table->string('name', 255)->nullable();
21
            $table->string('symbol', 255)->nullable();
22
            $table->string('disambiguate_symbol', 255)->nullable();
23
            $table->string('alternate_symbols', 255)->nullable();
24
            $table->string('subunit', 255)->nullable();
25
            $table->integer('subunit_to_unit')->default(100);
26
            $table->boolean('symbol_first')->default(1);
27
            $table->string('html_entity', 255)->nullable();
28
            $table->string('decimal_mark', 25)->nullable();
29
            $table->string('thousands_separator', 25)->nullable();
30
            $table->string('iso_numeric', 25)->nullable();
31
            $table->integer('smallest_denomination')->default(1);
32
            $table->boolean('active')->default(true);
33
            $table->timestamps();
34
        });
35
    }
36
37
    /**
38
     * Reverse the migrations.
39
     *
40
     * @return void
41
     */
42
    public function down()
43
    {
44
        Schema::dropIfExists('tm_currencies');
45
    }
46
}
47