Add SQL query for migrating user data from prm_user to new structure
- Created a new SQL file `query_mig_users.sql` to select and transform user data. - The query retrieves user details including user ID, name, email, and various flags. - Includes a commented-out query to count total users per group.
This commit is contained in:
18
database/seeders/MigDeleteModelHasRoleButNot1Seeder.php
Normal file
18
database/seeders/MigDeleteModelHasRoleButNot1Seeder.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Usermanagement\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class MigDeleteModelHasRoleButNot1Seeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// $this->call([]);
|
||||
DB::table('model_has_roles')->where('model_id', '!=', '1')->delete();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user