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

MYSQL drops table on init, on purpose? #26

Closed
Fenny opened this issue Jul 8, 2020 · 1 comment
Closed

MYSQL drops table on init, on purpose? #26

Fenny opened this issue Jul 8, 2020 · 1 comment

Comments

@Fenny
Copy link
Contributor

Fenny commented Jul 8, 2020

Hi @savsgio, I noticed that when we use the MYSQL provider the table gets dropped on initialization ( https://github.com/fasthttp/session/blob/master/providers/mysql/provider.go#L13 ).

So it's not possible to save session data in case of a server crash, I'm wondering if this is a design choice?

Thank you!

@savsgio
Copy link
Member

savsgio commented Jul 12, 2020

Hi @Fenny,

Sorry for delayed answer.

It's a bug, maybe could be added a flag in the provider config (MySQL, Postgre and Sqlite3) to reset or not the session table when starts.

Could you make the PR, please.

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

No branches or pull requests

2 participants