Entity Framework- Creating Index and ForeignKey name (Oracle) -
i have problem creating automatically names constraints , indexes. after length of constraint or index exceeds 30 characters name changed f.e:
"fk_ot_personal_equi_1685080621"
fortunately saw in method there parameter used name specific constraints , indexes.
createtable( "otdba.ot_personal_equipment", c => new { equipment_id = c.decimal(nullable: false, precision: 10, scale: 0), active_time = c.decimal(nullable: false, precision: 19, scale: 0), show_mode = c.decimal(nullable: false, precision: 10, scale: 0), resource_id = c.decimal(nullable: false, precision: 10, scale: 0), }) .primarykey(t => t.equipment_id) .foreignkey("otdba.ot_resources", t => t.resource_id, cascadedelete: true,name: "fk_ot_equipment_resources") .index(t => t.resource_id);
unfortunately doesn't work , if check auto-generated script have:
alter table "otdba"."ot_personal_equipment" add constraint "fk_ot_personal_equi_1685080621" foreign key ("resource_id") references "otdba"."ot_resources" ("resource_id") on delete cascade
/
without including change fk_ot_equipment_resources
basic question. why?
Comments
Post a Comment