🔥 Add initial database migrations, seeders, and factories

🎨 Refactor `Lecturer` model to include new fields and factory usage
🔧 Update `DatabaseSeeder` to handle default seeds
🛠️ Enhance `einundzwanzig` database configuration for SQLite compatibility
This commit is contained in:
BT
2026-05-02 17:17:13 +01:00
parent 04abf231bd
commit cb61d9d543
54 changed files with 1975 additions and 417 deletions
+13 -8
View File
@@ -3,21 +3,26 @@
namespace Database\Seeders;
use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(): void
{
// User::factory(10)->create();
User::query()->updateOrCreate(
['email' => 'test@example.com'],
['name' => 'Test User', 'password' => bcrypt('password')]
);
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
$this->call([
PlebSeeder::class,
ProjectProposalSeeder::class,
ElectionSeeder::class,
NostrSeeder::class,
MeetupSeeder::class,
CourseSeeder::class,
NotificationSeeder::class,
SecuritySeeder::class,
]);
}
}