Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated tables + v133 compatibility #794

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install tools
run: apt update && apt install -y git wget
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Gradle build
env:
API_VERSION: ${{ steps.get_version.outputs.API_VERSION }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@Configuration
public class MainDbTestContainers {
private static final MariaDBContainer<?> fafDBContainer = new MariaDBContainer<>("mariadb:10.6");
private static final GenericContainer<?> flywayMigrationsContainer = new GenericContainer<>("faforever/faf-db-migrations:v129");
private static final GenericContainer<?> flywayMigrationsContainer = new GenericContainer<>("faforever/faf-db-migrations:v133");
private static final Network sharedNetwork = Network.newNetwork();

@Bean
Expand Down
5 changes: 0 additions & 5 deletions src/inttest/resources/sql/prepDefaultData.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
INSERT INTO oauth_clients (id, name, client_secret, client_type, redirect_uris, default_redirect_uri, default_scope)
VALUES ('test', 'test', '{noop}test', 'public', 'http://localhost https://www.getpostman.com/oauth2/callback ',
'http://localhost',
'read_events read_achievements upload_map upload_mod upload_avatar write_account_data vote read_sensible_userdata');

INSERT INTO login (id, login, email, password, ip)
VALUES (1, 'USER', 'user@faforever.com', '92b7b421992ef490f3b75898ec0e511f1a5c02422819d89719b20362b023ee4f',
'127.0.0.1'),
Expand Down
12 changes: 0 additions & 12 deletions src/inttest/resources/sql/prepLeaderboardData.sql

This file was deleted.

3 changes: 0 additions & 3 deletions src/inttest/resources/sql/prepMapData.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ INSERT INTO map_version (id, description, max_players, width, height, version, f
(1, 'SCMP 001', 8, 5, 5, 1, 'maps/scmp_001.v0001.zip', 0, 1),
(2, 'SCMP 002', 8, 5, 5, 1, 'maps/scmp_002.v0001.zip', 0, 2);

INSERT INTO ladder_map (id, idmap) VALUES
(1, 1);

INSERT INTO map_pool (id, name) VALUES
(1, 'Ladder 1v1 <300'),
(2, 'Ladder 1v1 300-800'),
Expand Down
13 changes: 0 additions & 13 deletions src/inttest/resources/sql/truncateTables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,8 @@ DELETE FROM `game_player_stats`;
DELETE FROM `game_review`;
DELETE FROM `game_reviews_summary`;
DELETE FROM `game_stats`;
-- DELETE FROM `game_validity`;
DELETE FROM `global_rating`;
DELETE FROM `global_rating_distribution`;
DELETE FROM `global_rating_rank_view`;
-- DELETE FROM `group_permission`;
DELETE FROM `group_permission_assignment`;
DELETE FROM `jwt_users`;
DELETE FROM `ladder1v1_rating`;
DELETE FROM `ladder1v1_rating_distribution`;
DELETE FROM `ladder1v1_rating_rank_view`;
DELETE FROM `ladder_division`;
DELETE FROM `ladder_division_score`;
DELETE FROM `ladder_map`;
-- DELETE FROM `leaderboard`;
DELETE FROM `leaderboard_rating`;
DELETE FROM `leaderboard_rating_journal`;
Expand All @@ -53,8 +42,6 @@ DELETE FROM `mod_version_review`;
DELETE FROM `mod_version_reviews_summary`;
DELETE FROM `moderation_report`;
DELETE FROM `name_history`;
DELETE FROM `oauth_clients`;
DELETE FROM `oauth_tokens`;
DELETE FROM `patchs_table`;
DELETE FROM `player_achievements`;
DELETE FROM `player_events`;
Expand Down
34 changes: 0 additions & 34 deletions src/main/java/com/faforever/api/client/ClientType.java

This file was deleted.

99 changes: 0 additions & 99 deletions src/main/java/com/faforever/api/client/OAuthClient.java

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions src/main/java/com/faforever/api/client/package-info.java

This file was deleted.

50 changes: 0 additions & 50 deletions src/main/java/com/faforever/api/data/domain/Division.java

This file was deleted.

12 changes: 0 additions & 12 deletions src/main/java/com/faforever/api/data/domain/GlobalRating.java

This file was deleted.

21 changes: 0 additions & 21 deletions src/main/java/com/faforever/api/data/domain/Ladder1v1Rating.java

This file was deleted.

15 changes: 0 additions & 15 deletions src/main/java/com/faforever/api/data/domain/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.hibernate.annotations.BatchSize;

import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.ManyToMany;
import jakarta.persistence.OneToMany;
import jakarta.persistence.OneToOne;
Expand All @@ -27,26 +26,12 @@
public class Player extends Login {

public static final String TYPE_NAME = "player";
private Ladder1v1Rating ladder1v1Rating;
private GlobalRating globalRating;
private ClanMembership clanMembership;
private Set<NameRecord> names;
private Set<AvatarAssignment> avatarAssignments;
private Set<ModerationReport> reporterOnModerationReports;
private Set<ModerationReport> reportedOnModerationReports;

@OneToOne(mappedBy = "player", fetch = FetchType.LAZY)
@Deprecated
public Ladder1v1Rating getLadder1v1Rating() {
return ladder1v1Rating;
}

@OneToOne(mappedBy = "player", fetch = FetchType.LAZY)
@Deprecated
public GlobalRating getGlobalRating() {
return globalRating;
}

// Permission is managed by ClanMembership class
@UpdatePermission(expression = Prefab.ALL)
@OneToOne(mappedBy = "player")
Expand Down
Loading
Loading