NOT EXISTS removed from create_tables for better pgsql compatibility