読み取り専用で頻繁に使用される監査テーブルをデータベースの残りの部分から分離しようとしています。ファイルグループと別のファイルに入れるのが最善の解決策のようです。
ただし、エンティティ フレームワークでこれを設定する方法がわかりません。テーブルを手動でドロップして作成し、ファイル グループに制約を適用する必要がありますか?
現在、移行を使用してデータベースとテーブルを作成しています。
CreateTable(
"dbo.audi_auditing",
c => new
{
audi_id = c.Int(nullable: false, identity: true),
audi_id_first = c.String(maxLength: 20),
audi_id_second = c.String(maxLength: 20),
audi_data = c.String(storeType: "xml"),
tent_id = c.Int(),
audy_id = c.Int(nullable: false),
audi_created = c.DateTime(nullable: false, precision: 0, storeType: "datetime2"),
audi_created_by = c.String(nullable: false, maxLength: 50),
})
.PrimaryKey(t => t.audi_id)
.ForeignKey("dbo.tabe_table_entity", t => t.tent_id)
.ForeignKey("dbo.audy_audit_type", t => t.audy_id, cascadeDelete: true)
.Index(t => t.audi_id_first)
.Index(t => t.audi_id_second)
.Index(t => t.tent_id)
.Index(t => t.audy_id)
.Index(t => t.audi_created)
.Index(t => t.audi_created_by);