cleaned up code

This commit is contained in:
Fabian 2024-11-22 12:40:38 +01:00
parent ce8cf93f46
commit 6681b29d51
2 changed files with 5 additions and 7 deletions

View File

@ -21,4 +21,3 @@ drop table if exists user;
drop table if exists user_address; drop table if exists user_address;
drop table if exists user_payment; drop table if exists user_payment;

View File

@ -1,8 +1,9 @@
CREATE PROCEDURE prepare_data() CREATE PROCEDURE fill_user_table()
BEGIN BEGIN
DECLARE i INT DEFAULT 1; DECLARE i INT DEFAULT 1;
DECLARE emailString CHAR(16) DEFAULT 'test'; DECLARE emailString CHAR(16) DEFAULT 'test';
DELETE FROM webshop.user;
WHILE i < 100 WHILE i < 100
DO DO
@ -10,7 +11,5 @@ BEGIN
INSERT INTO webshop.user(is_active, name, lower_name, email) INSERT INTO webshop.user(is_active, name, lower_name, email)
VALUES ('1', 'harry', 'potter', emailString); VALUES ('1', 'harry', 'potter', emailString);
SET i = i + 1; SET i = i + 1;
end while; END WHILE;
end; END;
#CALL prepare_data();