Deploy from Lumerel
This commit is contained in:
19
migrations/001_create_todos_table.php
Normal file
19
migrations/001_create_todos_table.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Migration: Create todos table
|
||||
*
|
||||
* Creates the main todos table with all necessary fields for managing todo items.
|
||||
*/
|
||||
|
||||
$pdo->exec("
|
||||
CREATE TABLE IF NOT EXISTS todos (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
title VARCHAR(255) NOT NULL,
|
||||
description TEXT,
|
||||
is_completed BOOLEAN DEFAULT FALSE,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
)
|
||||
");
|
||||
|
||||
Reference in New Issue
Block a user