Application User setup WIP
This commit is contained in:
parent
c83442b4af
commit
cb6dd39596
16 changed files with 362 additions and 314 deletions
|
|
@ -14,22 +14,22 @@ namespace Database.NavigationSystem
|
|||
}
|
||||
public void CreateSystem()
|
||||
{
|
||||
//await CreateNavigationLinkTemplatesTable(schema);
|
||||
//await CreateNavigationLinkTemplateTranslationsTable(schema);
|
||||
}
|
||||
//await CreateNavigationLinkTemplatesTable(schema);
|
||||
//await CreateNavigationLinkTemplateTranslationsTable(schema);
|
||||
}
|
||||
|
||||
private async Task CreateNavigationLinkTemplatesTable(string schema)
|
||||
private async Task CreateNavigationLinkTemplatesTable()
|
||||
{
|
||||
var sql = $@"
|
||||
CREATE TABLE IF NOT EXISTS {schema}.navigation_link_templates (
|
||||
CREATE TABLE IF NOT EXISTS navigation_link_templates (
|
||||
id SERIAL PRIMARY KEY,
|
||||
parent_id INTEGER NULL,
|
||||
url VARCHAR(500) NOT NULL,
|
||||
permission_id INTEGER NULL,
|
||||
icon VARCHAR(100) NULL,
|
||||
default_order INTEGER NOT NULL,
|
||||
FOREIGN KEY (permission_id) REFERENCES {schema}.permissions(id),
|
||||
FOREIGN KEY (parent_id) REFERENCES {schema}.navigation_link_templates(id)
|
||||
FOREIGN KEY (permission_id) REFERENCES permissions(id),
|
||||
FOREIGN KEY (parent_id) REFERENCES navigation_link_templates(id)
|
||||
)";
|
||||
await _db.ExecuteAsync(sql);
|
||||
}
|
||||
|
|
@ -37,17 +37,14 @@ namespace Database.NavigationSystem
|
|||
private async Task CreateNavigationLinkTemplateTranslationsTable(string schema)
|
||||
{
|
||||
var sql = $@"
|
||||
CREATE TABLE IF NOT EXISTS {schema}.navigation_link_template_translations (
|
||||
CREATE TABLE IF NOT EXISTS navigation_link_template_translations (
|
||||
id SERIAL PRIMARY KEY,
|
||||
template_id INTEGER NOT NULL,
|
||||
language VARCHAR(10) NOT NULL,
|
||||
display_name VARCHAR(100) NOT NULL,
|
||||
FOREIGN KEY (template_id) REFERENCES {schema}.navigation_link_templates(id)
|
||||
FOREIGN KEY (template_id) REFERENCES navigation_link_templates(id)
|
||||
)";
|
||||
await _db.ExecuteAsync(sql);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue