mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
#18211: Ensuring ContentItemRecord_id canis not nullable
Work Item: 18211 --HG-- branch : 1.x
This commit is contained in:
@@ -17,8 +17,13 @@ namespace Orchard.Tests.Storage {
|
|||||||
_filePath = _folderPath + "\\testfile.txt";
|
_filePath = _folderPath + "\\testfile.txt";
|
||||||
|
|
||||||
if (Directory.Exists(_folderPath)) {
|
if (Directory.Exists(_folderPath)) {
|
||||||
|
try {
|
||||||
Directory.Delete(_folderPath, true);
|
Directory.Delete(_folderPath, true);
|
||||||
}
|
}
|
||||||
|
catch {
|
||||||
|
// happens sometimes
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Directory.CreateDirectory(_folderPath);
|
Directory.CreateDirectory(_folderPath);
|
||||||
File.WriteAllText(_filePath, "testfile contents");
|
File.WriteAllText(_filePath, "testfile contents");
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace Orchard.ContentManagement.DataMigrations {
|
|||||||
.Column<bool>("Published")
|
.Column<bool>("Published")
|
||||||
.Column<bool>("Latest")
|
.Column<bool>("Latest")
|
||||||
.Column<string>("Data", c => c.Unlimited())
|
.Column<string>("Data", c => c.Unlimited())
|
||||||
.Column<int>("ContentItemRecord_id")
|
.Column<int>("ContentItemRecord_id", c => c.NotNull())
|
||||||
);
|
);
|
||||||
|
|
||||||
SchemaBuilder.CreateTable("ContentTypeRecord",
|
SchemaBuilder.CreateTable("ContentTypeRecord",
|
||||||
|
|||||||
Reference in New Issue
Block a user