chore: add admin seeder & add collation only to mysql database in plans table and activation table

This commit is contained in:
idevakk
2025-11-09 03:25:19 -08:00
parent b023ef75c3
commit 391af8a778
5 changed files with 1148 additions and 757 deletions

View File

@@ -15,8 +15,14 @@ return new class extends Migration
$table->id();
$table->string('name');
$table->text('description')->nullable();
$table->string('product_id')->collation('utf8_bin');
$table->string('pricing_id')->collation('utf8_bin');
$productId = $table->string('product_id');
$pricingId = $table->string('pricing_id');
// Apply collation only for MySQL
if (Schema::getConnection()->getDriverName() === 'mysql') {
$productId->collation('utf8_bin');
$pricingId->collation('utf8_bin');
}
$table->integer('price');
$table->integer('mailbox_limit')->default(15);
$table->boolean('monthly_billing')->default(true);

View File

@@ -15,7 +15,12 @@ return new class extends Migration
$table->id();
$table->foreignId('user_id')->nullable()->constrained()->nullOnDelete();
$table->string('activation_key')->unique();
$table->string('price_id')->collation('utf8_bin');
$priceId = $table->string('price_id');
// Apply collation only for MySQL
if (Schema::getConnection()->getDriverName() === 'mysql') {
$priceId->collation('utf8_bin');
}
$table->boolean('is_activated')->default(false);
$table->timestamps();
});