diff --git a/migration/src/m20230704_104934_create_guilds_table.rs b/migration/src/m20230704_104934_create_guilds_table.rs index a284f7f..3e08543 100644 --- a/migration/src/m20230704_104934_create_guilds_table.rs +++ b/migration/src/m20230704_104934_create_guilds_table.rs @@ -15,8 +15,7 @@ impl MigrationTrait for Migration { ColumnDef::new(Guilds::Id) .integer() .not_null() - .auto_increment() - .primary_key(), + .auto_increment(), ) .col( ColumnDef::new(Guilds::GuildId) @@ -30,6 +29,7 @@ impl MigrationTrait for Migration { .not_null() .default(false), ) + .primary_key(Index::create().name("guilds_pkey").col(Guilds::Id)) .to_owned(), ) .await?; diff --git a/migration/src/m20230704_111535_create_lobbies_table.rs b/migration/src/m20230704_111535_create_lobbies_table.rs index 1ff71ab..fad7bbc 100644 --- a/migration/src/m20230704_111535_create_lobbies_table.rs +++ b/migration/src/m20230704_111535_create_lobbies_table.rs @@ -14,8 +14,7 @@ impl MigrationTrait for Migration { ColumnDef::new(Lobbies::Id) .integer() .not_null() - .auto_increment() - .primary_key(), + .auto_increment(), ) .col(ColumnDef::new(Lobbies::GuildId).big_unsigned().not_null()) .col( @@ -33,6 +32,7 @@ impl MigrationTrait for Migration { .big_unsigned() .not_null(), ) + .primary_key(Index::create().name("lobbies_pkey").col(Lobbies::Id)) .to_owned(), ) .await?; diff --git a/migration/src/m20230704_113006_create_players_table.rs b/migration/src/m20230704_113006_create_players_table.rs index 83f8cc8..8131c67 100644 --- a/migration/src/m20230704_113006_create_players_table.rs +++ b/migration/src/m20230704_113006_create_players_table.rs @@ -14,8 +14,7 @@ impl MigrationTrait for Migration { ColumnDef::new(Players::Id) .integer() .not_null() - .auto_increment() - .primary_key(), + .auto_increment(), ) .col( ColumnDef::new(Players::DiscordId) @@ -89,6 +88,7 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Players::PrimaryRole).custom(Role)) .col(ColumnDef::new(Players::SecondaryRole).custom(Role)) .col(ColumnDef::new(Players::TertiaryRole).custom(Role)) + .primary_key(Index::create().name("players_pkey").col(Players::Id)) .to_owned(), ) .await?;