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

feat: Update modules and new Mii database fields #19

Merged

Conversation

DaniElectra
Copy link
Member

@DaniElectra DaniElectra commented May 20, 2024

Add Mii profanity flag and character set to the 3DS friends database. This in theory allows better support of Mii names that use characters exclusive to the following regions: CHN, KOR or TWN.

Also get the Mii changed timestamp from the database, and not use the current time for it.

Update the go modules to get the latest stability updates and use the new fields on the Mii structure.

Required the following query to be run for migration:

Query
ALTER TABLE "3ds".user_data
ADD mii_profanity integer DEFAULT FALSE,
ADD mii_character_set integer DEFAULT 0;

UPDATE "3ds".user_data SET mii_profanity = FALSE WHERE mii_profanity IS NULL;
UPDATE "3ds".user_data SET mii_character_set = 0 WHERE mii_character_set IS NULL;

Add Mii profanity flag and character set to the 3DS friends database.
This in theory allows better support of Mii names that use characters
exclusive to the following regions: CHN, KOR or TWN.

Also get the Mii changed timestamp from the database, and not use the
current time for it.

Update the go modules to get the latest stability updates and use the
new fields on the Mii structure.
@jonbarrow
Copy link
Member

lgtm

@jonbarrow jonbarrow merged commit d5f7bb6 into PretendoNetwork:nex-go-rewrite May 20, 2024
@MatthewL246
Copy link
Member

MatthewL246 commented Jun 25, 2024

It looks like there's a typo in the migration query here.

ADD mii_profanity integer DEFAULT FALSE,

It should be boolean.

ALTER TABLE "3ds".user_data
ADD mii_profanity boolean DEFAULT FALSE,
ADD mii_character_set integer DEFAULT 0;

UPDATE "3ds".user_data SET mii_profanity = FALSE WHERE mii_profanity IS NULL;
UPDATE "3ds".user_data SET mii_character_set = 0 WHERE mii_character_set IS NULL;

@jonbarrow
Copy link
Member

Yes but this was already handled a month ago

@MatthewL246
Copy link
Member

It was handled for you, but I'm documenting it for others who might be migrating to nex-go-rewrite (me).

@jonbarrow
Copy link
Member

I assume people can figure that out, considering it's always treated as a bool. It's not a difficult thing to see and fix. Postgres won't even let you run the query as-is

This migration is also only really needed by people migrating existing servers, which is basically no one. Everyone else will just have the tables setup correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants