pve node tables

master
Tudor Stanciu 2022-04-07 10:04:17 +03:00
parent 6cd36697b6
commit 1b3d248da7
5 changed files with 48 additions and 0 deletions

View File

@ -9,6 +9,18 @@
</ItemGroup>
<ItemGroup>
<None Update="Scripts\1.0.0\06.Create PveNodeToken table.sql">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Scripts\1.0.0\05.Create PveNodeCredentials table.sql">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Scripts\1.0.0\04.Create PveNode table.sql">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Scripts\1.0.0\03.Create PveCluster table.sql">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Scripts\1.0.0\02.Create AuthenticationType table.sql">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>

View File

@ -0,0 +1,6 @@
CREATE TABLE PveCluster (
"Id" INTEGER NOT NULL,
"Code" TEXT NOT NULL UNIQUE,
"Name" TEXT NOT NULL,
CONSTRAINT "PK_PveCluster" PRIMARY KEY("Id" AUTOINCREMENT)
);

View File

@ -0,0 +1,13 @@
CREATE TABLE PveNode (
"Id" INTEGER NOT NULL,
"Name" TEXT NOT NULL,
"FullName" TEXT NOT NULL,
"IPv4" TEXT NOT NULL UNIQUE,
"Port" INTEGER NOT NULL,
"PreferredAuthenticationTypeId" INTEGER NOT NULL,
"ClusterId" INTEGER,
"Description" TEXT NOT NULL,
CONSTRAINT "FK_PveNode_AuthenticationType" FOREIGN KEY("AuthenticationTypeId") REFERENCES AuthenticationType("Id"),
CONSTRAINT "FK_PveNode_PveCluster" FOREIGN KEY("ClusterId") REFERENCES PveCluster("Id"),
CONSTRAINT "PK_PveNode" PRIMARY KEY("Id" AUTOINCREMENT)
);

View File

@ -0,0 +1,9 @@
CREATE TABLE PveNodeCredentials (
"Id" INTEGER NOT NULL,
"NodeId" INTEGER NOT NULL,
"UserName" TEXT NOT NULL,
"Password" TEXT NOT NULL,
"Default" INTEGER DEFAULT 0 NOT NULL,
CONSTRAINT "FK_PveNodeCredentials_PveNode" FOREIGN KEY("NodeId") REFERENCES PveNode("Id"),
CONSTRAINT "PK_PveNodeCredentials" PRIMARY KEY("Id" AUTOINCREMENT)
);

View File

@ -0,0 +1,8 @@
CREATE TABLE PveNodeToken (
"Id" INTEGER NOT NULL,
"NodeId" INTEGER NOT NULL,
"Token" TEXT NOT NULL,
"Default" INTEGER DEFAULT 0 NOT NULL,
CONSTRAINT "FK_PveNodeCredentials_PveNode" FOREIGN KEY("NodeId") REFERENCES PveNode("Id"),
CONSTRAINT "PK_PveNodeCredentials" PRIMARY KEY("Id" AUTOINCREMENT)
);