add challenge 11(portifolio)

This commit is contained in:
vista-man
2025-06-19 01:03:59 +02:00
parent 8faefd26ae
commit 5245c6f9b1
27 changed files with 1937 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
-- Create database
CREATE DATABASE IF NOT EXISTS portfolio;
USE portfolio;
-- Create projects table
CREATE TABLE IF NOT EXISTS projects (
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255) NOT NULL,
description TEXT,
image_url VARCHAR(255),
project_url VARCHAR(255),
tags VARCHAR(255),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Insert a sample project
INSERT INTO projects (title, description, image_url, project_url, tags)
VALUES (
'Sample Project',
'This is a sample project description.',
'assets/sample.jpg',
'https://example.com',
'html,css,school'
);

View File

@@ -0,0 +1,5 @@
-- Add long_description column to projects table
ALTER TABLE projects ADD COLUMN long_description TEXT AFTER description;
-- Update existing projects with long descriptions (optional)
UPDATE projects SET long_description = description WHERE long_description IS NULL;