mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-03 18:22:57 +00:00
21 lines
720 B
SQL
21 lines
720 B
SQL
-- Create clothing table for merchandising items
|
|
CREATE TABLE IF NOT EXISTS clothing (
|
|
id SERIAL PRIMARY KEY,
|
|
title VARCHAR(255) NOT NULL,
|
|
description TEXT,
|
|
price DECIMAL(10, 2),
|
|
currency VARCHAR(10) DEFAULT 'Kč',
|
|
image_url VARCHAR(500),
|
|
url VARCHAR(500),
|
|
is_active BOOLEAN DEFAULT true,
|
|
display_order INT DEFAULT 0,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
deleted_at TIMESTAMP
|
|
);
|
|
|
|
-- Create index for active items and ordering
|
|
CREATE INDEX idx_clothing_active ON clothing(is_active);
|
|
CREATE INDEX idx_clothing_display_order ON clothing(display_order);
|
|
CREATE INDEX idx_clothing_created_at ON clothing(created_at);
|