Skip to content

Commit

Permalink
Upgrading to v4: Models' ID column has been corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirHossein1372 committed Oct 23, 2021
1 parent 2ad1740 commit 0271c66
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/ApplicationVersion.swift
Expand Up @@ -13,7 +13,7 @@ final class ApplicationVersion: Model {

static let schema = "ApplicationVersion"

@ID(key: .id)
@ID(custom: .id)
var id: Int?

@Field(key: "platform")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/Category.swift
Expand Up @@ -12,7 +12,7 @@ final class Category : Model {

static let schema = "Category"

@ID(key: .id)
@ID(custom: .id)
var id:Int?

@Field(key: "title")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/Charity.swift
Expand Up @@ -13,7 +13,7 @@ final class Charity: Model {

static let schema = "Charity"

@ID(key: .id)
@ID(custom: .id)
var id: Int?

@OptionalField(key: "userId")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/ChatBlock.swift
Expand Up @@ -12,7 +12,7 @@ final class ChatBlock : Model {

static let schema = "ChatBlock"

@ID(key: .id)
@ID(custom: .id)
var id:Int?

@Field(key: "chatId")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/City.swift
Expand Up @@ -12,7 +12,7 @@ final class City : Model{

static let schema = "City"

@ID(key: .id)
@ID(custom: .id)
var id:Int?

@Parent(key: "province_id")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/Country.swift
Expand Up @@ -12,7 +12,7 @@ final class Country: Model {

static let schema = "Country"

@ID(key: .id)
@ID(custom: .id)
var id:Int?

@Field(key: "name")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/County.swift
Expand Up @@ -12,7 +12,7 @@ final class County : Model{

static let schema = "County"

@ID(key: .id)
@ID(custom: .id)
var id:Int?

@Field(key: "province_id")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/DirectChat.swift
Expand Up @@ -12,7 +12,7 @@ final class DirectChat: Model {

static let schema = "DirectChat"

@ID(key: .id)
@ID(custom: .id)
var id: Int?

@Field(key: "userId")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/Gift.swift
Expand Up @@ -13,7 +13,7 @@ final class Gift : Model {

static let schema = "Gift"

@ID(key: .id)
@ID(custom: .id)
var id:Int?

@OptionalParent(key: "userId")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/GiftRequest.swift
Expand Up @@ -12,7 +12,7 @@ final class GiftRequest: Model {

static let schema = "GiftRequest"

@ID(key: .id)
@ID(custom: .id)
var id: Int?

@Field(key: "requestUserId")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/PhoneNumberActivationCode.swift
Expand Up @@ -12,7 +12,7 @@ final class PhoneNumberActivationCode: Model {

static let schema = "PhoneNumberActivationCode"

@ID(key: .id)
@ID(custom: .id)
var id:Int?

@Field(key: "phoneNumber")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/PhoneNumberSeenLog.swift
Expand Up @@ -12,7 +12,7 @@ final class PhoneNumberSeenLog: Model {

static let schema = "PhoneNumberSeenLog"

@ID(key: .id)
@ID(custom: .id)
var id: Int?

@Field(key: "fromUserId")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/Province.swift
Expand Up @@ -12,7 +12,7 @@ final class Province: Model {

static let schema = "Province"

@ID(key: .id)
@ID(custom: .id)
var id:Int?

@Field(key: "name")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/Rating.swift
Expand Up @@ -12,7 +12,7 @@ final class Rating: Model {

static let schema = "Rating"

@ID(key: .id)
@ID(custom: .id)
var id: Int?

@Field(key: "reviewedId")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/RatingResult.swift
Expand Up @@ -12,7 +12,7 @@ final class RatingResult: Model {

static let schema = "RatingResult"

@ID(key: .id)
@ID(custom: .id)
var id: Int?

@Field(key: "reviewedId")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/Region.swift
Expand Up @@ -12,7 +12,7 @@ final class Region : Model {

static let schema = "Region"

@ID(key: .id)
@ID(custom: .id)
var id:Int?

@Parent(key: "city_id")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/Sponsor.swift
Expand Up @@ -12,7 +12,7 @@ final class Sponsor: Model {

static let schema = "Sponsor"

@ID(key: .id)
@ID(custom: .id)
var id: Int?

@Field(key: "name")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/TextMessage.swift
Expand Up @@ -12,7 +12,7 @@ final class TextMessage : Model {

static let schema = "TextMessage"

@ID(key: .id)
@ID(custom: .id)
var id:Int?

@Parent(key: "chatId")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/Token.swift
Expand Up @@ -12,7 +12,7 @@ final class Token: Model {

static let schema = "Token"

@ID(key: .id)
@ID(custom: .id)
var id: Int?

@Field(key: "token")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/User.swift
Expand Up @@ -13,7 +13,7 @@ final class User : Model {

static let schema = "User"

@ID(key: .id)
@ID(custom: .id)
var id:Int?

@Field(key: "phoneNumber")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/UserPhoneNumberLog.swift
Expand Up @@ -12,7 +12,7 @@ final class UserPhoneNumberLog: Model {

static let schema = "UserPhoneNumberLog"

@ID(key: .id)
@ID(custom: .id)
var id:Int?

@Field(key: "userId")
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/Models/Fluent/UserPushNotification.swift
Expand Up @@ -12,7 +12,7 @@ final class UserPushNotification: Model {

static let schema = "UserPushNotification"

@ID(key: .id)
@ID(custom: .id)
var id: Int?

@Field(key: "userId")
Expand Down

0 comments on commit 0271c66

Please sign in to comment.