sendou.ink/prisma/migrations/20201205144602-init/steps.json
Kalle (Sendou) 9735bc26b1 initial l
2020-12-05 22:02:47 +02:00

1106 lines
22 KiB
JSON

{
"version": "0.3.14-fixed",
"steps": [
{
"tag": "CreateEnum",
"enum": "RankedMode",
"values": [
"SZ",
"TC",
"RM",
"CB"
]
},
{
"tag": "CreateEnum",
"enum": "Mode",
"values": [
"TW",
"SZ",
"TC",
"RM",
"CB"
]
},
{
"tag": "CreateEnum",
"enum": "Region",
"values": [
"EU",
"NA",
"JP"
]
},
{
"tag": "CreateEnum",
"enum": "LeagueType",
"values": [
"TWIN",
"QUAD"
]
},
{
"tag": "CreateEnum",
"enum": "Ability",
"values": [
"CB",
"LDE",
"OG",
"T",
"H",
"NS",
"TI",
"RP",
"AD",
"DR",
"SJ",
"OS",
"BDU",
"REC",
"RES",
"ISM",
"ISS",
"MPU",
"QR",
"QSJ",
"RSU",
"SSU",
"SCU",
"SPU",
"SS",
"BRU"
]
},
{
"tag": "CreateSource",
"source": "db"
},
{
"tag": "CreateArgument",
"location": {
"tag": "Source",
"source": "db"
},
"argument": "provider",
"value": "\"postgresql\""
},
{
"tag": "CreateArgument",
"location": {
"tag": "Source",
"source": "db"
},
"argument": "url",
"value": "\"***\""
},
{
"tag": "CreateModel",
"model": "User"
},
{
"tag": "CreateField",
"model": "User",
"field": "id",
"type": "Int",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "User",
"field": "id"
},
"directive": "id"
}
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "User",
"field": "id"
},
"directive": "default"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "User",
"field": "id"
},
"directive": "default"
},
"argument": "",
"value": "autoincrement()"
},
{
"tag": "CreateField",
"model": "User",
"field": "username",
"type": "String",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "User",
"field": "discriminator",
"type": "String",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "User",
"field": "discordId",
"type": "String",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "User",
"field": "discordId"
},
"directive": "unique"
}
},
{
"tag": "CreateField",
"model": "User",
"field": "discordAvatar",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "User",
"field": "profile",
"type": "Profile",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "User",
"field": "player",
"type": "Player",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "User",
"field": "builds",
"type": "Build",
"arity": "List"
},
{
"tag": "CreateModel",
"model": "Profile"
},
{
"tag": "CreateField",
"model": "Profile",
"field": "twitterName",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Profile",
"field": "twitchName",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Profile",
"field": "youtubeId",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Profile",
"field": "country",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Profile",
"field": "sensMotion",
"type": "Float",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Profile",
"field": "sensStick",
"type": "Float",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Profile",
"field": "bio",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Profile",
"field": "weaponPool",
"type": "String",
"arity": "List"
},
{
"tag": "CreateField",
"model": "Profile",
"field": "customUrlPath",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Profile",
"field": "customUrlPath"
},
"directive": "unique"
}
},
{
"tag": "CreateField",
"model": "Profile",
"field": "user",
"type": "User",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Profile",
"field": "user"
},
"directive": "relation"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "Profile",
"field": "user"
},
"directive": "relation"
},
"argument": "fields",
"value": "[userId]"
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "Profile",
"field": "user"
},
"directive": "relation"
},
"argument": "references",
"value": "[id]"
},
{
"tag": "CreateField",
"model": "Profile",
"field": "userId",
"type": "Int",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Profile",
"field": "userId"
},
"directive": "unique"
}
},
{
"tag": "CreateModel",
"model": "XRankPlacement"
},
{
"tag": "CreateField",
"model": "XRankPlacement",
"field": "id",
"type": "Int",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "XRankPlacement",
"field": "id"
},
"directive": "id"
}
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "XRankPlacement",
"field": "id"
},
"directive": "default"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "XRankPlacement",
"field": "id"
},
"directive": "default"
},
"argument": "",
"value": "autoincrement()"
},
{
"tag": "CreateField",
"model": "XRankPlacement",
"field": "switchAccountId",
"type": "String",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "XRankPlacement",
"field": "player",
"type": "Player",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "XRankPlacement",
"field": "player"
},
"directive": "relation"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "XRankPlacement",
"field": "player"
},
"directive": "relation"
},
"argument": "fields",
"value": "[switchAccountId]"
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "XRankPlacement",
"field": "player"
},
"directive": "relation"
},
"argument": "references",
"value": "[switchAccountId]"
},
{
"tag": "CreateField",
"model": "XRankPlacement",
"field": "playerName",
"type": "String",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "XRankPlacement",
"field": "ranking",
"type": "Int",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "XRankPlacement",
"field": "xPower",
"type": "Float",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "XRankPlacement",
"field": "weapon",
"type": "String",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "XRankPlacement",
"field": "mode",
"type": "RankedMode",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "XRankPlacement",
"field": "month",
"type": "Int",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "XRankPlacement",
"field": "year",
"type": "Int",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Model",
"model": "XRankPlacement",
"arguments": [
{
"name": "",
"value": "[switchAccountId, mode, month, year]"
}
]
},
"directive": "unique"
}
},
{
"tag": "CreateModel",
"model": "LeagueSquad"
},
{
"tag": "CreateField",
"model": "LeagueSquad",
"field": "id",
"type": "Int",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "LeagueSquad",
"field": "id"
},
"directive": "id"
}
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "LeagueSquad",
"field": "id"
},
"directive": "default"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "LeagueSquad",
"field": "id"
},
"directive": "default"
},
"argument": "",
"value": "autoincrement()"
},
{
"tag": "CreateField",
"model": "LeagueSquad",
"field": "region",
"type": "Region",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "LeagueSquad",
"field": "type",
"type": "LeagueType",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "LeagueSquad",
"field": "leaguePower",
"type": "Float",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "LeagueSquad",
"field": "startTime",
"type": "DateTime",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "LeagueSquad",
"field": "members",
"type": "LeagueSquadMember",
"arity": "List"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Model",
"model": "LeagueSquad",
"arguments": [
{
"name": "",
"value": "[leaguePower, type, region]"
}
]
},
"directive": "index"
}
},
{
"tag": "CreateModel",
"model": "LeagueSquadMember"
},
{
"tag": "CreateField",
"model": "LeagueSquadMember",
"field": "squadId",
"type": "Int",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "LeagueSquadMember",
"field": "squad",
"type": "LeagueSquad",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "LeagueSquadMember",
"field": "squad"
},
"directive": "relation"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "LeagueSquadMember",
"field": "squad"
},
"directive": "relation"
},
"argument": "fields",
"value": "[squadId]"
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "LeagueSquadMember",
"field": "squad"
},
"directive": "relation"
},
"argument": "references",
"value": "[id]"
},
{
"tag": "CreateField",
"model": "LeagueSquadMember",
"field": "switchAccountId",
"type": "String",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "LeagueSquadMember",
"field": "player",
"type": "Player",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "LeagueSquadMember",
"field": "player"
},
"directive": "relation"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "LeagueSquadMember",
"field": "player"
},
"directive": "relation"
},
"argument": "fields",
"value": "[switchAccountId]"
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "LeagueSquadMember",
"field": "player"
},
"directive": "relation"
},
"argument": "references",
"value": "[switchAccountId]"
},
{
"tag": "CreateField",
"model": "LeagueSquadMember",
"field": "weapon",
"type": "String",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Model",
"model": "LeagueSquadMember",
"arguments": [
{
"name": "",
"value": "[squadId, switchAccountId]"
}
]
},
"directive": "unique"
}
},
{
"tag": "CreateModel",
"model": "Player"
},
{
"tag": "CreateField",
"model": "Player",
"field": "switchAccountId",
"type": "String",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Player",
"field": "switchAccountId"
},
"directive": "unique"
}
},
{
"tag": "CreateField",
"model": "Player",
"field": "userId",
"type": "Int",
"arity": "Optional"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Player",
"field": "userId"
},
"directive": "unique"
}
},
{
"tag": "CreateField",
"model": "Player",
"field": "name",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Player",
"field": "placements",
"type": "XRankPlacement",
"arity": "List"
},
{
"tag": "CreateField",
"model": "Player",
"field": "user",
"type": "User",
"arity": "Optional"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Player",
"field": "user"
},
"directive": "relation"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "Player",
"field": "user"
},
"directive": "relation"
},
"argument": "fields",
"value": "[userId]"
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "Player",
"field": "user"
},
"directive": "relation"
},
"argument": "references",
"value": "[id]"
},
{
"tag": "CreateField",
"model": "Player",
"field": "leaguePlacements",
"type": "LeagueSquadMember",
"arity": "List"
},
{
"tag": "CreateModel",
"model": "Build"
},
{
"tag": "CreateField",
"model": "Build",
"field": "id",
"type": "Int",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Build",
"field": "id"
},
"directive": "id"
}
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Build",
"field": "id"
},
"directive": "default"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "Build",
"field": "id"
},
"directive": "default"
},
"argument": "",
"value": "autoincrement()"
},
{
"tag": "CreateField",
"model": "Build",
"field": "userId",
"type": "Int",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "Build",
"field": "weapon",
"type": "String",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "Build",
"field": "title",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Build",
"field": "description",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Build",
"field": "modes",
"type": "Mode",
"arity": "List"
},
{
"tag": "CreateField",
"model": "Build",
"field": "headGear",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Build",
"field": "headAbilities",
"type": "Ability",
"arity": "List"
},
{
"tag": "CreateField",
"model": "Build",
"field": "clothingGear",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Build",
"field": "clothingAbilities",
"type": "Ability",
"arity": "List"
},
{
"tag": "CreateField",
"model": "Build",
"field": "shoesGear",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Build",
"field": "shoesAbilities",
"type": "Ability",
"arity": "List"
},
{
"tag": "CreateField",
"model": "Build",
"field": "abilityPoints",
"type": "Json",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "Build",
"field": "top500",
"type": "Boolean",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "Build",
"field": "jpn",
"type": "Boolean",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "Build",
"field": "updatedAt",
"type": "DateTime",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Build",
"field": "updatedAt"
},
"directive": "updatedAt"
}
},
{
"tag": "CreateField",
"model": "Build",
"field": "user",
"type": "User",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Build",
"field": "user"
},
"directive": "relation"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "Build",
"field": "user"
},
"directive": "relation"
},
"argument": "fields",
"value": "[userId]"
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "Build",
"field": "user"
},
"directive": "relation"
},
"argument": "references",
"value": "[id]"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Model",
"model": "Build",
"arguments": [
{
"name": "",
"value": "weapon"
}
]
},
"directive": "index"
}
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Model",
"model": "Build",
"arguments": [
{
"name": "",
"value": "userId"
}
]
},
"directive": "index"
}
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Model",
"model": "Build",
"arguments": [
{
"name": "",
"value": "abilityPoints"
}
]
},
"directive": "index"
}
}
]
}