-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update osx/linux guides to include work arounds for issues in beta6
- Loading branch information
Nate McMaster
committed
Jul 29, 2015
1 parent
ffe944b
commit 522124a
Showing
9 changed files
with
226 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- Bugs in Mono 4.0.2 may cause Entity Framework to crash when using async methods. This is resolved with Mono >4.2.0, which has not yet been publicly released. `See aspnet/EntityFramework#2708 <https://github.com/aspnet/EntityFramework/issues/2708>`_ on GitHub | ||
- Migrations on SQLite do not support more complex schema changes due to limitations in SQLite itself. | ||
|
||
- Bugs in beta 6. See `Workarounds`_. | ||
- Migrations requires that you have a "Startup" class in your project. `Issue #2357 <https://github.com/aspnet/EntityFramework/issues/2357>`_. | ||
- Migrations adds an annotation that will cause a build error. `Issue #2545 <https://github.com/aspnet/EntityFramework/issues/2545>`_. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.DS_Store | ||
Thumbs.db | ||
project.lock.json | ||
*.db |
61 changes: 61 additions & 0 deletions
61
...arted/x-plat/sample/src/ConsoleApp/Migrations/20150729221913_MyFirstMigration.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
52 changes: 52 additions & 0 deletions
52
...etting-started/x-plat/sample/src/ConsoleApp/Migrations/20150729221913_MyFirstMigration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System.Collections.Generic; | ||
using Microsoft.Data.Entity.Migrations; | ||
using Microsoft.Data.Entity.Migrations.Builders; | ||
using Microsoft.Data.Entity.Migrations.Operations; | ||
|
||
namespace ConsoleAppMigrations | ||
{ | ||
public partial class MyFirstMigration : Migration | ||
{ | ||
public override void Up(MigrationBuilder migration) | ||
{ | ||
migration.CreateTable( | ||
name: "Blog", | ||
columns: table => new | ||
{ | ||
BlogId = table.Column(type: "INTEGER", nullable: false), | ||
// .Annotation("Sqlite:Autoincrement", true), | ||
Name = table.Column(type: "TEXT", nullable: true), | ||
Url = table.Column(type: "TEXT", nullable: true) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Blog", x => x.BlogId); | ||
}); | ||
migration.CreateTable( | ||
name: "Post", | ||
columns: table => new | ||
{ | ||
PostId = table.Column(type: "INTEGER", nullable: false), | ||
// .Annotation("Sqlite:Autoincrement", true), | ||
BlogId = table.Column(type: "INTEGER", nullable: false), | ||
Content = table.Column(type: "TEXT", nullable: true), | ||
Title = table.Column(type: "TEXT", nullable: true) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Post", x => x.PostId); | ||
table.ForeignKey( | ||
name: "FK_Post_Blog_BlogId", | ||
columns: x => x.BlogId, | ||
referencedTable: "Blog", | ||
referencedColumn: "BlogId"); | ||
}); | ||
} | ||
|
||
public override void Down(MigrationBuilder migration) | ||
{ | ||
migration.DropTable("Post"); | ||
migration.DropTable("Blog"); | ||
} | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
docs/getting-started/x-plat/sample/src/ConsoleApp/Migrations/BloggingContextModelSnapshot.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System; | ||
using Microsoft.Data.Entity; | ||
using Microsoft.Data.Entity.Metadata; | ||
using Microsoft.Data.Entity.Migrations.Infrastructure; | ||
using ConsoleApp; | ||
|
||
namespace ConsoleAppMigrations | ||
{ | ||
[ContextType(typeof(BloggingContext))] | ||
partial class BloggingContextModelSnapshot : ModelSnapshot | ||
{ | ||
public override void BuildModel(ModelBuilder builder) | ||
{ | ||
builder | ||
.Annotation("ProductVersion", "7.0.0-beta6-13815"); | ||
|
||
builder.Entity("ConsoleApp.Blog", b => | ||
{ | ||
b.Property<int>("BlogId") | ||
.ValueGeneratedOnAdd(); | ||
b.Property<string>("Name"); | ||
b.Property<string>("Url"); | ||
b.Key("BlogId"); | ||
}); | ||
|
||
builder.Entity("ConsoleApp.Post", b => | ||
{ | ||
b.Property<int>("PostId") | ||
.ValueGeneratedOnAdd(); | ||
b.Property<int>("BlogId"); | ||
b.Property<string>("Content"); | ||
b.Property<string>("Title"); | ||
b.Key("PostId"); | ||
}); | ||
|
||
builder.Entity("ConsoleApp.Post", b => | ||
{ | ||
b.Reference("ConsoleApp.Blog") | ||
.InverseCollection() | ||
.ForeignKey("BlogId"); | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters