Database configuration and users table migration