2014-10-16 74 views
0

我正在關注this James Ward Playframework tutorial並且在27:00左右有一個生成的SQL文件,其中有#整個標誌。這些是什麼意思?有這個詞嗎? (我添加了下面的文件)播放框架:`#`出現在生成的SQL文件中

當我刪除它們以符合SQL語法時,我得到一個SQLException,我的表無法找到。我保留#符號,但我不明白他們爲什麼在那裏。誰能解釋一下?

這裏是文件,以供參考:

#--- Created by Ebean DDL 
# To stop Ebean DDL generation, remove this comment and start using Evolutions 

# --- !Ups 

create table bar (
    id      varchar(255) not null, 
    name      varchar(255), 
    constraint pk_bar primary key (id)) 
; 

create sequence bar_seq; 




# --- !Downs 

SET REFERENTIAL_INTEGRITY FALSE; 

drop table if exists bar; 

SET REFERENTIAL_INTEGRITY TRUE; 

drop sequence if exists bar_seq; 

回答

0

此文件是Evolutions plugin一部分。基本上,它允許Play服務器啓動時更新數據庫模式。我懷疑,Ebean已經與evolutions整合並創建了這些文件。 '#'符號是evolutions插件語法的一部分。