mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
schema/edge: add support for configuring foreign-key symbols
Fixed #1423
This commit is contained in:
committed by
Ariel Mashraki
parent
745afde770
commit
f3f03e1edd
@@ -103,6 +103,12 @@ func TestSQLite(t *testing.T) {
|
||||
ContainsFold(t, client)
|
||||
}
|
||||
|
||||
func TestStorageKey(t *testing.T) {
|
||||
require.Equal(t, "user_pet_id", migratev2.PetsTable.ForeignKeys[0].Symbol)
|
||||
require.Equal(t, "user_friend_id1", migratev2.FriendsTable.ForeignKeys[0].Symbol)
|
||||
require.Equal(t, "user_friend_id2", migratev2.FriendsTable.ForeignKeys[1].Symbol)
|
||||
}
|
||||
|
||||
func V1ToV2(t *testing.T, dialect string, clientv1 *entv1.Client, clientv2 *entv2.Client) {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user