Skip to content

[Repositories] Add expedition repositories#1223

Merged
Akkadius merged 1 commit intomasterfrom
akkadius/update-repositories-expeditions
Feb 6, 2021
Merged

[Repositories] Add expedition repositories#1223
Akkadius merged 1 commit intomasterfrom
akkadius/update-repositories-expeditions

Conversation

@Akkadius
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
Contributor 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
Copy Markdown
Contributor 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