2025_07_11_090151_create_sms_templates_table.php 693 B

1234567891011121314151617181920212223242526
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. use App\Database\Migrations\TenantMigration;
  6. return new class extends TenantMigration
  7. {
  8. public function up()
  9. {
  10. Schema::create('sms_templates', function (Blueprint $table) {
  11. $table->id();
  12. $table->string('name');
  13. $table->text('content');
  14. $table->unsignedBigInteger('created_by');
  15. $table->timestamps();
  16. $table->foreign('created_by')->references('id')->on('users');
  17. });
  18. }
  19. public function down()
  20. {
  21. Schema::dropIfExists('sms_templates');
  22. }
  23. };