Skip to content

kkaveman/utslabTODO

Repository files navigation

utslabTODO

1.open DBMS , database initialization :

CREATE DATABASE IF NOT EXISTS todo_list_db /change this db name to ur choice/ USE todo_list_db

CREATE TABLE users ( id INT AUTO_INCREMENT PRIMARY KEY, username VARCHAR(50) NOT NULL UNIQUE, email VARCHAR(100) NOT NULL UNIQUE, password VARCHAR(255) NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );

CREATE TABLE todo_lists ( id INT AUTO_INCREMENT PRIMARY KEY, user_id INT NOT NULL, title VARCHAR(100) NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE );

CREATE TABLE tasks ( id INT AUTO_INCREMENT PRIMARY KEY, list_id INT NOT NULL, title VARCHAR(255) NOT NULL, completed BOOLEAN DEFAULT FALSE, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (list_id) REFERENCES todo_lists(id) ON DELETE CASCADE );

2.change database config in config.php, sesuaikan username & password di DBMS

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published