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

[Repositories] Add expedition repositories #1223

Merged
merged 1 commit into from
Feb 6, 2021

Conversation

Akkadius
Copy link
Member

@Akkadius Akkadius commented Feb 6, 2021

No description provided.

@Akkadius Akkadius requested a review from hgtw February 6, 2021 00:12
int character_id;
std::string expedition_name;
std::string event_name;
std::string expire_time;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should generate a time_t for DATETIME fields instead of a string

entry.character_id = 0;
entry.expedition_name = "";
entry.event_name = "";
entry.expire_time = current_timestamp();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this method in the source, maybe an artifact from the autogen for DATETIME columns?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure where this came from tbh

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's coming from the MySQL default value column; that's why. Should still probably change how this outputs a bit. Easy enough to change either way

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

        my $default_value = 0;
        if ($column_default ne "NULL" && $column_default ne "") {
            $column_default =~ s/'/"/g;
            $default_value = $column_default;
        }
        elsif ($column_default eq "''") {
            $default_value = '""';
        }
        elsif ((trim($column_default) eq "" || $column_default eq "NULL") && $column_type =~ /text|varchar/i) {
            $default_value = '""';
        }

@Akkadius Akkadius merged commit b7f7c66 into master Feb 6, 2021
@Akkadius Akkadius deleted the akkadius/update-repositories-expeditions branch February 8, 2021 00:08
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.

2 participants