sql script for user model