Nav apraksta

2021_02_16_142747_create_cycles_table.php 714B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. class CreateCyclesTable extends Migration {
  5. /**
  6. * Run the migrations.
  7. *
  8. * @return void
  9. */
  10. public function up()
  11. {
  12. Schema::create('cycles', function(Blueprint $table)
  13. {
  14. // id unico
  15. $table->increments('id');
  16. // cuando a~nos tiene el ciclo('3')
  17. $table->integer('years_in_cycle');
  18. // cuando comienza el ciclo ('2019')
  19. $table->integer('start');
  20. // cuando termina el ciclo ('2022')
  21. $table->integer('end');
  22. $table->timestamps();
  23. });
  24. }
  25. /**
  26. * Reverse the migrations.
  27. *
  28. * @return void
  29. */
  30. public function down()
  31. {
  32. Schema::drop('cycles');
  33. }
  34. }