mirror of
https://github.com/ForFarmTeam/ForFarm.git
synced 2025-12-18 21:44:08 +01:00
feat: create inventory_items table migration
This commit is contained in:
parent
860181d983
commit
41e5b1fb81
16
backend/migrations/00004_create_inventory_items_table.sql
Normal file
16
backend/migrations/00004_create_inventory_items_table.sql
Normal file
@ -0,0 +1,16 @@
|
||||
-- +goose Up
|
||||
CREATE TABLE inventory_items (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
name TEXT NOT NULL,
|
||||
category TEXT NOT NULL,
|
||||
type TEXT NOT NULL,
|
||||
quantity DOUBLE PRECISION NOT NULL,
|
||||
unit TEXT NOT NULL,
|
||||
date_added TIMESTAMPTZ NOT NULL,
|
||||
status TEXT NOT NULL,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
);
|
||||
|
||||
CREATE INDEX idx_inventory_items_category ON inventory_items(category);
|
||||
CREATE INDEX idx_inventory_items_status ON inventory_items(status);
|
||||
Loading…
Reference in New Issue
Block a user