diff options
Diffstat (limited to 'spring-boot/03-bank-jdbc-rest/db-schema')
| -rw-r--r-- | spring-boot/03-bank-jdbc-rest/db-schema/mariadb-schema.sql | 4 | ||||
| -rw-r--r-- | spring-boot/03-bank-jdbc-rest/db-schema/postgressql-schema.sql | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/spring-boot/03-bank-jdbc-rest/db-schema/mariadb-schema.sql b/spring-boot/03-bank-jdbc-rest/db-schema/mariadb-schema.sql new file mode 100644 index 0000000..167aa55 --- /dev/null +++ b/spring-boot/03-bank-jdbc-rest/db-schema/mariadb-schema.sql @@ -0,0 +1,4 @@ +CREATE TABLE account ( + account_number int(11) primary key NOT NULL AUTO_INCREMENT, + balance float DEFAULT NULL +) Engine=InnoDB; diff --git a/spring-boot/03-bank-jdbc-rest/db-schema/postgressql-schema.sql b/spring-boot/03-bank-jdbc-rest/db-schema/postgressql-schema.sql new file mode 100644 index 0000000..6ed17fa --- /dev/null +++ b/spring-boot/03-bank-jdbc-rest/db-schema/postgressql-schema.sql @@ -0,0 +1,10 @@ +CREATE TABLE account ( + account_number int(11) primary key NOT NULL, + balance float DEFAULT NULL +); + +CREATE SEQUENCE account_account_number_seq; + +ALTER TABLE account + ALTER COLUMN account_number + SET DEFAULT NEXTVAL('account_account_number_seq');
\ No newline at end of file |
