java - play framework evolution issue on deleting or updating model name -



java - play framework evolution issue on deleting or updating model name -

i having big issue understanding evolutions in play framework ,

when create model named "questions" follow evolution appears

# --- !ups create table questions ( id varchar(255) not null, question varchar(255), constraint pk_questions primary key (id)) ; # --- !downs set foreign_key_checks=0; drop table questions; set foreign_key_checks=1;

now when delete model , create 1 named questions evolution stays same,

# --- !ups create table questions ( id varchar(255) not null, question varchar(255), constraint pk_questions primary key (id)) ; # --- !downs set foreign_key_checks=0; drop table questions; set foreign_key_checks=1;

when update questions next time shows this(delete question variable)

create table questions ( id varchar(255) not null, question varchar(255), constraint pk_questions primary key (id)) ; create table questions ( id varchar(255) not null, constraint pk_questions primary key (id)) ; # --- !downs set foreign_key_checks=0; drop table questions; drop table questions; set foreign_key_checks=1;

why won't update table name also? there no relevant documentation find lastly hope :(.

do have 2 class : questions , questions ? if case considered bad practices , should rename 1 in format. moroever of class should begin upper case character. should solve problem. if not satisfied name of table generated ebean, utilize annotation on class :

@table(name="whatever_name_i_want") class myclass { }

i recommand utilize lower case table name (some info base of operations not case sensitive).

the fact table name same wether first letter upper case or lower case because ebean translate camel case class name snake case table name. in snake case letters lower case.

java playframework playframework-2.0

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -