Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Coscine
backend
libraries
Migrations
Commits
e5f0f037
Commit
e5f0f037
authored
Jun 02, 2020
by
L. Ellenbeck
Browse files
Merge branch 'Topic/798-tosMiddleware' into 'Product/708-tosProcess'
New: TOS DB Model See merge request coscine/cs/migrations!16
parents
d173cedf
1046ca32
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/Migrator/Migrations/Migration202005251520TOS.cs
0 → 100644
View file @
e5f0f037
using
FluentMigrator
;
using
System
;
namespace
Coscine.Database.Migration.Migrations
{
//yyyymmddhhmm
[
Migration
(
202005251520
)]
public
class
Migration202005251520TOS
:
FluentMigrator
.
Migration
{
public
override
void
Down
()
{
Delete
.
Table
(
"TOSAccepted"
);
}
public
override
void
Up
()
{
Create
.
Table
(
"TOSAccepted"
)
.
WithColumn
(
"RelationId"
).
AsGuid
().
PrimaryKey
().
WithDefault
(
SystemMethods
.
NewGuid
)
.
WithColumn
(
"UserId"
).
AsGuid
().
NotNullable
()
.
WithColumn
(
"Version"
).
AsString
(
10
).
NotNullable
();
Create
.
ForeignKey
()
.
FromTable
(
"TOSAccepted"
).
ForeignColumn
(
"UserId"
)
.
ToTable
(
"Users"
).
PrimaryColumn
(
"Id"
);
}
}
}
src/Migrator/Migrator.csproj
View file @
e5f0f037
...
...
@@ -170,6 +170,7 @@
<Compile
Include=
"Migrations\Migration202003121255ActivatedFeatures.cs"
/>
<Compile
Include=
"Migrations\Migration202004151354S3ResourceUrl.cs"
/>
<Compile
Include=
"Migrations\Migration202003192117ORCiDEmailAddress.cs"
/>
<Compile
Include=
"Migrations\Migration202005251520TOS.cs"
/>
<Compile
Include=
"Migrator.cs"
/>
<Compile
Include=
"Program.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
...
...
src/Migrator/Program.cs
View file @
e5f0f037
...
...
@@ -55,7 +55,6 @@ namespace Coscine.Database.Migration
}
else
{
Console
.
WriteLine
(
"Argument missing or invalid. Please enter the number of steps to roll back!"
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment