Skip to content

Commit ffe341e

Browse files
Ja bist du narrischJa bist du narrisch
authored andcommitted
Added string id to FK
1 parent 1e30880 commit ffe341e

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

src/Migrator/Framework/ForeignKeyConstraint.cs

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,29 @@
22

33
namespace DotNetProjects.Migrator.Framework;
44

5-
public class ForeignKeyConstraint : IDbField
6-
{
7-
public ForeignKeyConstraint()
8-
{ }
9-
10-
public ForeignKeyConstraint(string name, string table, string[] columns, string pkTable, string[] pkColumns)
11-
{
12-
Name = name;
13-
Table = table;
14-
Columns = columns;
15-
PkTable = pkTable;
16-
PkColumns = pkColumns;
17-
}
5+
public class ForeignKeyConstraint : IDbField
6+
{
7+
public ForeignKeyConstraint()
8+
{ }
189

19-
public string Name { get; set; }
20-
public string Table { get; set; }
21-
public string[] Columns { get; set; }
22-
public string PkTable { get; set; }
23-
public string[] PkColumns { get; set; }
10+
public ForeignKeyConstraint(string name, string table, string[] columns, string pkTable, string[] pkColumns, string stringId = null)
11+
{
12+
StringId = stringId;
13+
Name = name;
14+
Table = table;
15+
Columns = columns;
16+
PkTable = pkTable;
17+
PkColumns = pkColumns;
2418
}
19+
20+
/// <summary>
21+
/// Gets or sets the Id of the FK. This is not the name of the FK.
22+
/// SQLite:
23+
/// </summary>
24+
public string StringId { get; set; }
25+
public string Name { get; set; }
26+
public string Table { get; set; }
27+
public string[] Columns { get; set; }
28+
public string PkTable { get; set; }
29+
public string[] PkColumns { get; set; }
30+
}

0 commit comments

Comments
 (0)