A UserManager implementation that uses databases to store [User]s.
A UserManager implementation that uses databases to store [User]s.
Either uses the [Database] set to it's [code]database[/code] property, or it uses the default database.
Uses the database module, so it's only available if it's enabled during compile time.
The current default database cration code:
[code]var tb : TableBuilder = get_table_builder()
tb.create_table(_database_table_name)
tb.integer("id").auto_increment().next_row()
tb.varchar("username", 60).not_null().next_row()
tb.varchar("username_internal", 60).not_null().next_row()
tb.varchar("email", 100).not_null().next_row()
tb.varchar("email_internal", 100).not_null().next_row()
tb.integer("rank").not_null().next_row()
tb.varchar("pre_salt", 100).next_row()
tb.varchar("post_salt", 100).next_row()
tb.varchar("password_hash", 100).next_row()
tb.integer("banned").next_row()
tb.varchar("password_reset_token", 100).next_row()
tb.integer("locked").next_row()
tb.primary_key("id")
tb.ccreate_table()
tb.run_query()[/code]
Override this method to create default user entries when the database gets seeded.
By default this does not create anything.
Create the required table(s).
Drop the required table(s).
Standard migration method called by the database singleton.
Update your tables if necessary.
[method _migrate] calls this when needed.
[method _migrate] calls this when needed.
Calls [method _create_default_entries].
Creates the required table(s).
Calls [method _create_table].
Drop the required table(s).
Calls [method _drop_table].
Get a [DatabaseConnection] from the current database.
Get a [QueryBuilder] from the current database.
Get a [TableBuilder] from the current database.
Standard migration method called by the database singleton.
Calls [method _migrate].
Update your tables if necessary.
[method _migrate] calls this when needed.
Calls [method _update_table].
Lets you set a custom [Database] to be used if [DatabaseManager.ddb] isn't desired.
Lets you specify a table name.