-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Description
When running migrations with Storm on a fresh MySQL/MariaDB database, a warning appears for the users table:
[WARN]: Dropping column 'PASSWORD_EXPIRATION_TIME' because it's not present in the local class
Even though the database is fresh and the table does not exist yet. Renaming the table to anything else (in my example to "players") resolves the issue. This causes fatal errors and my application to fail, while SQLite didn't have any trouble,
Steps to reproduce
- Create a fresh MySQL database.
- Use a Storm migration with a model class named UserModel mapped to the table users.
- Run storm.runMigrations().
- Observe the warning in the logs.
Expected Behavior
Storm should create the users table without falsely detecting columns from system tables.
Actual Behavior
Storm seems to detect extra columns like PASSWORD_EXPIRATION_TIME (which exist in the system table mysql.user) and logs warnings about dropping them, even though the table does not exist in the user schema.
Environment
Database: MariaDB
OS: Ubuntu 24.04
Notes / Possible Cause
The issue appears to be related to the table name users conflicting with the system table mysql.user. This causes Storm to introspect system tables when checking schema metadata, resulting in false warnings about columns that are not part of the model.
Workarounds
Rename the table to something that does not conflict with system tables (e.g., players).
Suggested Fix / Enhancement
- Add a safeguard in Storm to ignore system tables when introspecting schema metadata.
- Document reserved table names that could conflict with MySQL/MariaDB system tables.