CREATE TABLE `users` (
	`id` integer PRIMARY KEY NOT NULL,
	`username` text NOT NULL,
	`email` text,
	`nickname` text,
	`password` text NOT NULL,
	`avatar` text,
	`role` text DEFAULT 'user' NOT NULL,
	`status` text DEFAULT 'active' NOT NULL,
	`public_slug` text,
	`bio_markdown` text,
	`bio_visibility` text DEFAULT 'private' NOT NULL,
	`social_links_json` text DEFAULT '[]' NOT NULL,
	`avatar_visibility` text DEFAULT 'private' NOT NULL,
	`discover_visible` integer DEFAULT true NOT NULL,
	`discover_location` text,
	`discover_show_location` integer DEFAULT false NOT NULL,
	`created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL,
	`updated_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL
);
--> statement-breakpoint
CREATE UNIQUE INDEX `users_username_unique` ON `users` (`username`);--> statement-breakpoint
CREATE UNIQUE INDEX `users_public_slug_unique` ON `users` (`public_slug`);