Log DB
This commit is contained in:
@@ -141,6 +141,10 @@
|
||||
<Compile Include="Migrations\201903172015115_SongNumber.Designer.cs">
|
||||
<DependentUpon>201903172015115_SongNumber.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\201903172028249_Log.cs" />
|
||||
<Compile Include="Migrations\201903172028249_Log.Designer.cs">
|
||||
<DependentUpon>201903172028249_Log.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\Configuration.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
@@ -174,6 +178,9 @@
|
||||
<EmbeddedResource Include="Migrations\201903172015115_SongNumber.resx">
|
||||
<DependentUpon>201903172015115_SongNumber.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\201903172028249_Log.resx">
|
||||
<DependentUpon>201903172028249_Log.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
using API.Models;
|
||||
using API.Migrations;
|
||||
using System.Data.Entity;
|
||||
|
||||
namespace API.Database {
|
||||
public class DataContext : DbContext {
|
||||
|
||||
public DataContext() : base("DataContext") { }
|
||||
public DataContext() : base("DataContext") {
|
||||
System.Data.Entity.Database.SetInitializer(new MigrateDatabaseToLatestVersion<DataContext, Configuration>());
|
||||
}
|
||||
|
||||
public DbSet<Song> Songs { get; set; }
|
||||
public DbSet<Change> Changes { get; set; }
|
||||
public DbSet<File> Files { get; set; }
|
||||
public DbSet<User> Users { get; set; }
|
||||
public DbSet<API.Models.Log> Logs { get; set; }
|
||||
}
|
||||
}
|
||||
29
API/API/Migrations/201903172028249_Log.Designer.cs
generated
Normal file
29
API/API/Migrations/201903172028249_Log.Designer.cs
generated
Normal file
@@ -0,0 +1,29 @@
|
||||
// <auto-generated />
|
||||
namespace API.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
|
||||
public sealed partial class Log : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(Log));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201903172028249_Log"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
27
API/API/Migrations/201903172028249_Log.cs
Normal file
27
API/API/Migrations/201903172028249_Log.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
namespace API.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class Log : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
CreateTable(
|
||||
"dbo.Logs",
|
||||
c => new
|
||||
{
|
||||
ID = c.Long(nullable: false, identity: true),
|
||||
Date = c.DateTime(nullable: false),
|
||||
Method = c.String(),
|
||||
})
|
||||
.PrimaryKey(t => t.ID);
|
||||
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropTable("dbo.Logs");
|
||||
}
|
||||
}
|
||||
}
|
||||
126
API/API/Migrations/201903172028249_Log.resx
Normal file
126
API/API/Migrations/201903172028249_Log.resx
Normal file
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Target" xml:space="preserve">
|
||||
<value>H4sIAAAAAAAEAO1cW2/kNBR+R+I/RHkC1G3aLkJQzYDKbLsasd1Wne7C28pN3BmLxJmNnaoV4pfxwE/iL+BLLr5l4syNslohrVrH57PPxcfnHJ/yz19/j356zNLgARYE5XgcHh8ehQHEcZ4gPB+HJb1/8X34049ffjE6T7LH4H097yWfxygxGYcLSpenUUTiBcwAOcxQXOQkv6eHcZ5FIMmjk6OjH6Lj4wgyiJBhBcHopsQUZVD8wn6d5DiGS1qC9DJPYEqqcfZlJlCDtyCDZAliOA7PrqeHrwAFd4DAMDhLEWB7mMH0PgwAxjkFlO3w9B2BM1rkeD5bsgGQ3j4tIZt3D1JOJXZ+2k73ZeLohDMRtYQ1VFwSmmcDAY9fVlKJTPK1ZBs2UmNyO2fypU+cayG7cThZADxnrJtLnU7Sgk+TgpXiP5STDwL560Gjd2Ye/L+DYFKmtCzgGMOSFiA9CK7LuxTFv8Cn2/x3iMe4TFN1P2xH7Js2wIaui3wJC/p0A++rXU5fhUGk00UmYUOm0EgOpph+920YvGWLg7sUNupWuJ3RvICvI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u/vH7IaQjicRvarQ3SAmyy4sFLjjrlA6nq42HFf3WGfzmAvY3dDk6ivrbCtzwVaNaP0dZ10NZy5Q2aDm0YrW2YnmQnX2SO2wSU1VUdts0d+T5mjLel6NaFbn2c6ZGtBqZldBmSNQ/lcGzAcRNG8heF0Xw1hzAc2cKb7Pa1dk7KieYkfngIX24KxgCRyIKfvMs2HxFyRVP/I5i0eTKb4q6bKkjGWY3aXacxn3aKvWF/10+p5HV0vxJxfbYIFtE/Hs5Ar/XKI0afZ94YiJOiC4q6xCeK5LykP5+VODJLvqfYAq8TUenseNKQMjV3gGlL+OGLA3dgrfwDmIn+pidjdIvyJ0sY9eITAvQEYqjJae/cpsOMkef/wXjipkDtFDAAA=</value>
|
||||
</data>
|
||||
<data name="DefaultSchema" xml:space="preserve">
|
||||
<value>dbo</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -3,7 +3,7 @@ namespace API.Migrations {
|
||||
|
||||
internal sealed class Configuration : DbMigrationsConfiguration<Database.DataContext> {
|
||||
public Configuration() {
|
||||
AutomaticMigrationsEnabled = false;
|
||||
AutomaticMigrationsEnabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
<Compile Include="Change.cs" />
|
||||
<Compile Include="File.cs" />
|
||||
<Compile Include="FileType.cs" />
|
||||
<Compile Include="Log.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Song.cs" />
|
||||
<Compile Include="SongType.cs" />
|
||||
|
||||
10
API/Models/Log.cs
Normal file
10
API/Models/Log.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace API.Models {
|
||||
public class Log {
|
||||
public long ID { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public string Method { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user