diff --git a/src/main/resources/db.migration/V20240131091231__create_db_expensys.sql b/src/main/resources/db.migration/V20240131091231__create_db_expensys.sql new file mode 100644 index 0000000..838beff --- /dev/null +++ b/src/main/resources/db.migration/V20240131091231__create_db_expensys.sql @@ -0,0 +1 @@ +create DATABASE expensys; \ No newline at end of file diff --git a/src/main/resources/db.migration/V20240131091358__create_table_expenses.sql b/src/main/resources/db.migration/V20240131091358__create_table_expenses.sql new file mode 100644 index 0000000..c5fb9d3 --- /dev/null +++ b/src/main/resources/db.migration/V20240131091358__create_table_expenses.sql @@ -0,0 +1,9 @@ +CREATE TABLE `expenses` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `date` date NOT NULL, + `item` varchar(255) NOT NULL, + `category` enum('GROCERIES','VEGETABLES_FRUITS_DAIRY_AND_MEAT','MEDICAL','OUTSIDE_FOOD','LOSE_OF_MONEY','SALON_AND_COSMETICS','TRANSPORT','SHOPPING','ENTERTAINMENT','RENT_AND_OTHER_BILLS','OTHERS') NOT NULL, + `spent` double NOT NULL, + `spent_by` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; \ No newline at end of file