db scripts cleanup

This commit is contained in:
Soby Chacko
2021-04-16 16:35:39 -04:00
parent 93481433cf
commit f346e5a4c1
4 changed files with 14 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ applications:
SPRING_CLOUD_STREAM_BINDINGS_OUTPUT_DESTINATION: fromjdbcsource SPRING_CLOUD_STREAM_BINDINGS_OUTPUT_DESTINATION: fromjdbcsource
JDBC_QUERY: 'select id, name, tag from test order by id' JDBC_QUERY: 'select id, name, tag from test order by id'
SPRING_DATASOURCE_INITIALIZATION-MODE: ALWAYS SPRING_DATASOURCE_INITIALIZATION-MODE: ALWAYS
SPRING_DATASOURCE_SCHEMA: https://raw.githubusercontent.com/spring-cloud/spring-cloud-stream-acceptance-tests/master/db-scripts/sample-schema.sql SPRING_DATASOURCE_SCHEMA: https://raw.githubusercontent.com/spring-cloud/spring-cloud-stream-acceptance-tests/master/db-scripts/sample-schema-mysql.sql
services: services:
- scst-rabbit - scst-rabbit
- scst-mysql - scst-mysql

View File

@@ -0,0 +1,11 @@
CREATE DATABASE IF NOT EXISTS test;
USE test;
DROP TABLE IF EXISTS test;
create table test(
id bigint,
name varchar (2000),
tag char(1)
);
insert into test values (1, 'Bob', NULL);
insert into test values (2, 'Jane', NULL);
insert into test values (3, 'John', NULL);

View File

@@ -1,5 +1,3 @@
CREATE DATABASE IF NOT EXISTS test;
USE test;
DROP TABLE IF EXISTS test; DROP TABLE IF EXISTS test;
create table test( create table test(
id bigint, id bigint,
@@ -8,4 +6,4 @@ create table test(
); );
insert into test values (1, 'Bob', NULL); insert into test values (1, 'Bob', NULL);
insert into test values (2, 'Jane', NULL); insert into test values (2, 'Jane', NULL);
insert into test values (3, 'John', NULL); insert into test values (3, 'John', NULL);

View File

@@ -34,7 +34,7 @@ spec:
- name: SPRING_DATASOURCE_INITIALIZATION-MODE - name: SPRING_DATASOURCE_INITIALIZATION-MODE
value: ALWAYS value: ALWAYS
- name: SPRING_DATASOURCE_SCHEMA - name: SPRING_DATASOURCE_SCHEMA
value: https://raw.githubusercontent.com/spring-cloud/stream-applications-acceptance-tests/master/db-scripts/sample-schema.sql value: https://raw.githubusercontent.com/spring-cloud/stream-applications-acceptance-tests/master/db-scripts/sample-schema-mysql.sql
- name: SPRING_DATASOURCE_USERNAME - name: SPRING_DATASOURCE_USERNAME
value: root value: root
- name: SPRING_DATASOURCE_PASSWORD - name: SPRING_DATASOURCE_PASSWORD