added 'dev-api' subdomain for redirect to htaccess; fixed db error on empty db in the index action at api controller; update db sql schema file