This commit is contained in:
Janus Knudsen 2025-02-12 17:38:01 +01:00
parent 6839cd82e2
commit cf25e6fa0a
5 changed files with 44 additions and 17 deletions

View file

@ -25,7 +25,7 @@ namespace Database.Core.DCL
{
_db = db;
}
public void Setup(string schema = null)
{
throw new NotImplementedException();

View file

@ -26,7 +26,7 @@ namespace Database.Core.DDL
/// <param name="schema">The schema name where the tables will be created.</param>
public void With(Command emptyByIntention)
{
using (_transaction = _db.BeginTransaction())
using (_transaction = _db.OpenWithTransaction())
{
try
{
@ -56,7 +56,7 @@ namespace Database.Core.DDL
/// <summary>
/// Creates the users table
/// </summary>
public void CreateUsersTable()
void CreateUsersTable()
{
var sql = @"
CREATE TABLE IF NOT EXISTS users (
@ -80,7 +80,7 @@ namespace Database.Core.DDL
/// <summary>
/// Creates the tenants table
/// </summary>
public void CreateTenantsTable()
void CreateTenantsTable()
{
var sql = @"
CREATE TABLE IF NOT EXISTS tenants (
@ -98,7 +98,7 @@ namespace Database.Core.DDL
/// <summary>
/// Creates the user_tenants table
/// </summary>
public void CreateUserTenantsTable()
void CreateUserTenantsTable()
{
var sql = @"
CREATE TABLE IF NOT EXISTS user_tenants (
@ -116,7 +116,7 @@ namespace Database.Core.DDL
/// <summary>
/// Sets up Row Level Security (RLS) for the tenants and user_tenants tables.
/// </summary>
public void SetupRLS()
void SetupRLS()
{
var sql = new[]
{