Skip to content

Commit

Permalink
Merge pull request #10 from carlosbuenosvinos/master
Browse files Browse the repository at this point in the history
Add db_setup.sh for those who have Unix + use TEXT not VARCHAR(65000)
  • Loading branch information
vlingo-java committed May 28, 2015
2 parents 10eb099 + 700ee82 commit 4cbfba5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
9 changes: 9 additions & 0 deletions iddd_collaboration/src/main/mysql/db_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
# -------------------------------------------
# IDDD collaboration views database setup
# -------------------------------------------

echo Creating IDDD Collaboration Event Store and Views database...
mysql -u root -p < collaboration.sql

echo Completed
4 changes: 2 additions & 2 deletions iddd_common/src/main/mysql/common.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ USE iddd_common_test;

CREATE TABLE `tbl_es_event_store` (
`event_id` bigint(20) NOT NULL auto_increment,
`event_body` varchar(65000) NOT NULL,
`event_body` TEXT NOT NULL,
`event_type` varchar(250) NOT NULL,
`stream_name` varchar(250) NOT NULL,
`stream_version` int(11) NOT NULL,
Expand All @@ -30,7 +30,7 @@ CREATE TABLE `tbl_published_notification_tracker` (

CREATE TABLE `tbl_stored_event` (
`event_id` bigint(20) NOT NULL auto_increment,
`event_body` varchar(65000) NOT NULL,
`event_body` TEXT NOT NULL,
`occurred_on` datetime NOT NULL,
`type_name` varchar(200) NOT NULL,
PRIMARY KEY (`event_id`)
Expand Down
12 changes: 12 additions & 0 deletions iddd_common/src/main/mysql/db_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# -------------------------------------------
# IDDD Common database setup
# -------------------------------------------

echo Creating IDDD Common test database...
cat test_common.sql > create_test_common.sql
cat common.sql >> create_test_common.sql
mysql -u root -p < create_test_common.sql
rm -f create_test_common.sql

echo Completed
12 changes: 12 additions & 0 deletions iddd_identityaccess/src/main/mysql/db_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# -------------------------------------------
# IDDD IdentityAccess database setup
# -------------------------------------------

echo Creating IDDD IdentityAccess database...
cat iam.sql > create_iam.sql
cat ../../../../iddd_common/src/main/mysql/common.sql >> create_iam.sql
mysql -u root -p < create_iam.sql
rm -f create_iam.sql

echo Completed

0 comments on commit 4cbfba5

Please sign in to comment.