i701 490150f9b7 Refactor user actions and authentication components
- Updated user verification logic to include atoll and island relationships.
- Introduced CreateClient function for integrating with external client API.
- Replaced 'house_name' with 'address' in user signup data handling.
- Added new Checkbox component for improved UI interactions.
- Migrated database provider from SQLite to PostgreSQL and redefined user schema.
- Removed obsolete migration files and ensured database integrity with new structure.
2024-11-30 23:38:20 +05:00

15 lines
449 B
SQL

-- CreateTable
CREATE TABLE "Device" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"mac" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
"userId" TEXT,
CONSTRAINT "Device_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "Device" ADD CONSTRAINT "Device_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE CASCADE;