'integer', 'is_active' => 'boolean', 'last_synced_at' => 'datetime', ]; protected static function newFactory(): SourceDatabaseFactory { return SourceDatabaseFactory::new(); } public function tables(): HasMany { return $this->hasMany(Table::class); } public function migrationSchedules(): HasMany { return $this->hasMany(MigrationSchedule::class, 'source_database_id'); } public function getConnectionConfig(): array { $config = [ 'driver' => $this->driver, 'host' => $this->host, 'port' => $this->port, 'database' => $this->database, 'username' => $this->username, 'password' => $this->password, 'charset' => 'utf8', 'prefix' => '', 'prefix_indexes' => true, ]; // Add PostgreSQL-specific options if ($this->driver === 'pgsql') { $config['search_path'] = 'public'; $config['sslmode'] = 'prefer'; } return $config; } }