2022_01_17_174321_api_tables.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class ApiTables extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('logs', function (Blueprint $table) {
  15. $table->id();
  16. $table->string('id_user');
  17. $table->ipAddress('ip');
  18. $table->timestamp('date');
  19. });
  20. Schema::create('mcompv', function (Blueprint $table) {
  21. $table->id();
  22. $table->string('nombre');
  23. $table->integer('dias_vacaciones');
  24. $table->string('dias_descanso');
  25. $table->string('earn_as_you_go', 1);
  26. $table->integer('dias_earn_as_you_go')->nullable();
  27. $table->string('caducidad');
  28. $table->timestamp('date');
  29. $table->string('estatus', 1);
  30. });
  31. Schema::create('mcomun', function (Blueprint $table) {
  32. $table->id();
  33. $table->string('rfc')->unique();
  34. $table->string('nombre');
  35. $table->timestamp('date');
  36. $table->string('estatus', 1);
  37. });
  38. Schema::create('mcomor', function (Blueprint $table) {
  39. $table->id();
  40. $table->string('id_user')->unique();
  41. $table->string('id_jefe_directo');
  42. $table->string('id_jefe_sustituto');
  43. $table->timestamp('date');
  44. $table->string('estatus', 1);
  45. });
  46. Schema::create('mcomdf', function (Blueprint $table) {
  47. $table->id();
  48. $table->integer('anio');
  49. $table->timestamp('dia');
  50. $table->string('estatus', 1);
  51. });
  52. Schema::create('mesmsv', function (Blueprint $table) {
  53. $table->id();
  54. $table->integer('dias')->nullable();
  55. $table->timestamp('f_inicio')->nullable();
  56. $table->timestamp('f_final')->nullable();
  57. $table->longText('descripcion');
  58. $table->string('estatus', 1);
  59. $table->string('numero_empleado')->unique();
  60. });
  61. }
  62. /**
  63. * Reverse the migrations.
  64. *
  65. * @return void
  66. */
  67. public function down()
  68. {
  69. Schema::dropIfExists('logs');
  70. Schema::dropIfExists('mcompv');
  71. Schema::dropIfExists('mcomun');
  72. Schema::dropIfExists('mcomor');
  73. Schema::dropIfExists('mcomdf');
  74. Schema::dropIfExists('mesmsv');
  75. }
  76. }