You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
482 B

CREATE TABLE categories (
category_id INT PRIMARY KEY AUTO_INCREMENT,
category_name VARCHAR(255) NOT NULL
);
CREATE TABLE tasks (
task_id INT PRIMARY KEY AUTO_INCREMENT,
task_name VARCHAR(255) NOT NULL,
description TEXT,
due_date DATE,
category_id INT,
completed BOOLEAN DEFAULT FALSE,
FOREIGN KEY (category_id) REFERENCES categories(category_id)
);
INSERT INTO categories (category_name) VALUES ('Работа'), ('Дом'), ('Личное');

Powered by TurnKey Linux.