So I'm having a problem putting my play app on Heroku
Went through a couple of tutorials but couldn't get it to work.
My play app is getting displayed but the database for it is not getting created.
When I go through the logs this is coming
Database 'default' is in inconsistent state
....
Oops, cannot start the server.
.....
ERROR: syntax error at or near "auto_increment"
This is the configuration:
In application.conf all database lines are commented
1.sql
is the same as normal (no changes)Procfile is as follows
web: target/start -Dhttp.port=${PORT} ${JAVA_OPTS} -DapplyEvolutions.default=true -Ddb.default.driver=org.postgresql.Driver -Ddb.default.url=${DATABASE_URL}
A shortened version of 1.sql is as follows (auto generated)
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table admin (
user_id bigint auto_increment not null,
user_name varchar(255),
user_username varchar(255),
user_password varchar(255),
user_privelege_level integer,
user_type integer,
admin_id bigint,
constraint pk_admin primary key (user_id))
;
# --- a lot more tables
alter table class add constraint fk_class_classteacher_1 foreign key (classteacher_user_id) references teacher (user_id) on delete restrict on update restrict;
create index ix_class_classteacher_1 on class (classteacher_user_id);
# --- a lot more fks and indices
# --- !Downs
SET FOREIGN_KEY_CHECKS=0;
drop table admin;
drop table book;
# --- a lot more drops
SET FOREIGN_KEY_CHECKS=1;