Fix schema creating scripts
Fix migration script