Database dont change


#1

Hi i have a problem when i try to add my datamodel into the database all the tables run but the last relation not ( Lineup ) this is my datamodel:

type Country {
id: ID! @id
name: String!
code: String!
leagues: [League!]!
}

type League {
id: ID! @id
name: String!
country: Country!
seasons: [Season!]! @relation(name: “LeagueSeason”)
rounds: [Round!]!
}

type Season {
id: ID! @id
name: String!
leagues: [League!]! @relation(name: “LeagueSeason”)
teams: [Team!]! @relation(name: “TeamSeason”)
rounds: [Round!]!
}

type LeagueSeason @relationTable {
league: League!
season: Season!
}

type Round {
id: ID! @id
start: DateTime
end: DateTime
league: League!
season: Season!
}

type Team {
id: ID! @id
name: String!
logo: String!
code: String
founded: Int
seasons: [Season!]! @relation(name: “TeamSeason”)
teamLocal: [Match!]! @relation(name: “TeamLocal”)
teamVisitor: [Match!]! @relation(name: “TeamVisitor”)
players: [Player!]!
}

type TeamSeason @relationTable {
team: Team!
season: Season!
}

type Match {
id: ID! @id
local: Team! @relation(name: “TeamLocal”)
visitor: Team! @relation(name: “TeamVisitor”)
events: [Event!]!
players: [Player!]! @relation(name: “Lineup”)
}

type Player {
id: ID! @id
firstname: String
lastname: String
fullname: String!
commonName: String!
photo: String
team: Team
events: [Event!]!
matches: [Match!]! @relation(name: “Lineup”)
}

enum EventType {
ASSISTS
BLOCKED_SHOTS
CORNER_KICKS
COUNTER_ATTACKS
CROSS_ATTACKS
FOUOLS
FREE_KICKS
GOALS
GOAL_ATTEMPTS
OFFSIDES
BALL_POSSESSION
RED_CARDS
GOOLKEEPER_SAVES
SHOTS_OFF_GOAL
SHOTS_ON_GOAL
SUBSTITUTIONS
THROWINS
MEDICAL_TREATMENT
YELLOW_CARDS
}

type Event {
id: ID! @id
type: EventType
player: Player!
match: Match!
}

type Lineup @relationTable {
player: Player!
match: Match!
}

I dont find nothing with the debug.

I run prisma deploy and prisma generate the deploy but seams that dont save the model, because always that i run prisma deploy they find all the models like a change.


#2

What database are you using?


#3

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.