Initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
-- Nuclear option: Delete ALL users and let seed data recreate them
|
||||
-- WARNING: This deletes ALL users including any you've created manually
|
||||
-- Run against PowderCoatingDb
|
||||
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
PRINT 'Deleting all user-related data...';
|
||||
|
||||
-- Delete all user-related records
|
||||
DELETE FROM AspNetUserClaims;
|
||||
DELETE FROM AspNetUserRoles;
|
||||
DELETE FROM AspNetUserLogins;
|
||||
DELETE FROM AspNetUserTokens;
|
||||
DELETE FROM AspNetUsers;
|
||||
|
||||
PRINT 'All users deleted.';
|
||||
PRINT 'User count: ' + CAST((SELECT COUNT(*) FROM AspNetUsers) AS VARCHAR);
|
||||
PRINT 'Restart the application to recreate seed users.';
|
||||
|
||||
COMMIT TRANSACTION;
|
||||
Reference in New Issue
Block a user