WIP cozy
This commit is contained in:
parent
91da89a4e8
commit
a15cc00595
4 changed files with 20 additions and 36 deletions
|
|
@ -22,26 +22,23 @@ namespace PlanTempus.Database.RolesPermissionSystem
|
|||
/// <param name="schema">The schema name where the tables will be created.</param>
|
||||
public void CreateSystem()
|
||||
{
|
||||
|
||||
//if (!Validations.IsValidSchemaName(_schema))
|
||||
// throw new ArgumentException("Invalid schema name", _schema);
|
||||
|
||||
using (var transaction = _db.BeginTransaction())
|
||||
using var transaction = _db.BeginTransaction();
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
CreateRolesTable();
|
||||
CreatePermissionsTable();
|
||||
CreatePermissionTypesTable();
|
||||
CreateRolePermissionsTable();
|
||||
CreateRolesTable();
|
||||
CreatePermissionsTable();
|
||||
CreatePermissionTypesTable();
|
||||
CreateRolePermissionsTable();
|
||||
|
||||
transaction.Commit();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
transaction.Rollback();
|
||||
throw new InvalidOperationException("Failed to create system tables.", ex);
|
||||
}
|
||||
transaction.Commit();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
transaction.Rollback();
|
||||
throw new InvalidOperationException("Failed to create system tables.", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue