Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Database
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Coscine
backend
libraries
Database
Merge requests
!28
New: Create DB for collecting of logs
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
New: Create DB for collecting of logs
Topic/460-addDbForLoggingLibrary
into
Product/458-implementLoggingLibrary
Overview
0
Commits
1
Pipelines
1
Changes
2
Merged
David Schimmel
requested to merge
Topic/460-addDbForLoggingLibrary
into
Product/458-implementLoggingLibrary
5 years ago
Overview
0
Commits
1
Pipelines
1
Changes
2
coscine/issues#460
Edited
5 years ago
by
Marcel Nellesen
0
0
Merge request reports
Compare
Product/458-implementLoggingLibrary
Product/458-implementLoggingLibrary (base)
and
latest version
latest version
ee294246
1 commit,
5 years ago
2 files
+
40
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
src/Migrator/Migrations/Migration201911121400Logging.cs
0 → 100644
+
39
−
0
View file @ ee294246
Edit in single-file editor
Open in Web IDE
using
FluentMigrator
;
using
System
;
using
System.IO
;
using
System.Linq
;
using
System.Reflection
;
using
System.Xml
;
using
System.Xml.Linq
;
namespace
Coscine.Database.Migration.Migrations
{
//yyyymmddhhmm
[
Migration
(
201911121400
)]
public
class
Migration201911121400Logging
:
FluentMigrator
.
Migration
{
public
override
void
Down
()
{
Delete
.
Table
(
"Log"
);
}
public
override
void
Up
()
{
Create
.
Table
(
"Log"
)
.
WithColumn
(
"Id"
).
AsGuid
().
PrimaryKey
().
WithDefault
(
SystemMethods
.
NewGuid
)
.
WithColumn
(
"ServerTimestamp"
).
AsDateTime
().
WithDefault
(
SystemMethods
.
CurrentDateTime
).
Nullable
()
.
WithColumn
(
"ClientTimestamp"
).
AsDateTime
().
WithDefault
(
SystemMethods
.
CurrentDateTime
).
Nullable
()
.
WithColumn
(
"LogLevel"
).
AsString
(
20
).
Nullable
()
.
WithColumn
(
"Message"
).
AsString
(
500
).
Nullable
()
.
WithColumn
(
"Stacktrace"
).
AsString
(
8000
).
Nullable
()
.
WithColumn
(
"UserId"
).
AsGuid
().
Nullable
()
.
WithColumn
(
"URI"
).
AsString
(
500
).
Nullable
()
.
WithColumn
(
"Server"
).
AsString
(
200
).
Nullable
()
.
WithColumn
(
"CorrolationId"
).
AsGuid
().
Nullable
()
.
WithColumn
(
"Status"
).
AsString
(
200
).
Nullable
()
.
WithColumn
(
"Source"
).
AsString
(
200
).
Nullable
();
}
}
}
\ No newline at end of file
Loading