2026_06_06_113837_create_parser_links_table.php 798 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. /*
  6. * Таблица ссылок для парсера.
  7. * Каждая строка — один URL, который парсер обходит.
  8. * Создана: 2026-06-06
  9. * Индексы: sort_order (сортировка списка)
  10. */
  11. return new class extends Migration
  12. {
  13. public function up(): void
  14. {
  15. Schema::create('parser_links', function (Blueprint $table) {
  16. $table->id();
  17. $table->string('url');
  18. $table->integer('sort_order')->default(0)->index();
  19. $table->timestamps();
  20. });
  21. }
  22. public function down(): void
  23. {
  24. Schema::dropIfExists('parser_links');
  25. }
  26. };