Skip to content

Commit ca7812d

Browse files
committed
persistent_logins] table sql in separate file and in all profiles
1 parent ed27c63 commit ca7812d

5 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/main/resources/datasource-dev.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
<map>
2424
<entry key="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
2525
<entry key="hibernate.format_sql" value="true"/>
26-
<entry key="hibernate.hbm2ddl.auto" value="validate"/>
26+
<entry key="hibernate.hbm2ddl.auto" value="create"/>
27+
<entry key="hibernate.hbm2ddl.import_files" value="/security-tables.sql,/dummy-data.sql" />
2728
<entry key="hibernate.hbm2ddl.import_files_sql_extractor" value="org.hibernate.tool.hbm2ddl.MultipleLinesSqlCommandExtractor" />
2829
</map>
2930
</property>

src/main/resources/datasource-test.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<entry key="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
2424
<entry key="hibernate.format_sql" value="true"/>
2525
<entry key="hibernate.hbm2ddl.auto" value="create-drop"/>
26-
<entry key="hibernate.hbm2ddl.import_files" value="no" />
26+
<entry key="hibernate.hbm2ddl.import_files" value="/security-tables.sql" />
2727
</map>
2828
</property>
2929
</bean>
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ INSERT INTO users_roles(user_id, role_id) VALUES(2, 1);
1212

1313
INSERT INTO users_roles(user_id, role_id) VALUES(3, 1);
1414

15-
CREATE TABLE IF NOT EXISTS persistent_logins (username varchar(64) not null, series varchar(64) primary key, token varchar(64) not null, last_used timestamp not null);
16-
1715
INSERT INTO tags(Id, name) VALUES(1, 'c++');
1816
INSERT INTO tags(Id, name) VALUES(2, 'java');
1917
INSERT INTO tags(Id, name) VALUES(3, 'php');
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CREATE TABLE IF NOT EXISTS persistent_logins (username varchar(64) not null, series varchar(64) primary key, token varchar(64) not null, last_used timestamp not null);

src/test/resources/alexp/blog/controller/data.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@
2626
<comments id="2" post_id="1" user_id="1" commentText="comment2 text" dateTime="2015-04-01 13:40:00"/>
2727
<comments id="3" post_id="1" user_id="2" commentText="comment3 text" dateTime="2015-04-01 13:50:00"/>
2828

29+
<persistent_logins/>
30+
2931
</dataset>

0 commit comments

Comments
 (0)