sale  | 2026/05/25 05:13:32 Database connected successfully (driver: sqlite)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.273ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="users"
sale  | 
sale  | 2026/05/25 05:13:32 /app/backend/internal/utils/database.go:54
sale  | [2.703ms] [rows:0] CREATE TABLE `users` (`id` integer PRIMARY KEY AUTOINCREMENT,`username` text NOT NULL,`email` text NOT NULL,`password_hash` text NOT NULL,`role` text NOT NULL DEFAULT "user",`purchase_credits` integer DEFAULT 0,`invite_code` text,`referred_by` integer,`email_verified` numeric DEFAULT false,`is_active` numeric DEFAULT true,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [2.166ms] [rows:0] CREATE INDEX `idx_users_deleted_at` ON `users`(`deleted_at`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.760ms] [rows:0] CREATE UNIQUE INDEX `idx_users_invite_code` ON `users`(`invite_code`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [2.411ms] [rows:0] CREATE UNIQUE INDEX `idx_users_email` ON `users`(`email`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [2.077ms] [rows:0] CREATE UNIQUE INDEX `idx_users_username` ON `users`(`username`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.049ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="categories"
sale  | 
sale  | 2026/05/25 05:13:32 /app/backend/internal/utils/database.go:54
sale  | [1.797ms] [rows:0] CREATE TABLE `categories` (`id` integer PRIMARY KEY AUTOINCREMENT,`name` text NOT NULL,`description` text,`parent_id` integer,`min_amount` real,`max_amount` real,`min_quantity` integer,`max_quantity` integer,`min_weight` real,`max_weight` real,`sort_order` integer DEFAULT 0,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime,CONSTRAINT `fk_categories_children` FOREIGN KEY (`parent_id`) REFERENCES `categories`(`id`))
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.936ms] [rows:0] CREATE INDEX `idx_categories_deleted_at` ON `categories`(`deleted_at`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.103ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="brands"
sale  | 
sale  | 2026/05/25 05:13:32 /app/backend/internal/utils/database.go:54
sale  | [2.034ms] [rows:0] CREATE TABLE `brands` (`id` integer PRIMARY KEY AUTOINCREMENT,`name` text NOT NULL,`description` text,`logo` text,`sort_order` integer DEFAULT 0,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.806ms] [rows:0] CREATE INDEX `idx_brands_deleted_at` ON `brands`(`deleted_at`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.792ms] [rows:0] CREATE UNIQUE INDEX `idx_brands_name` ON `brands`(`name`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.038ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="products"
sale  | 
sale  | 2026/05/25 05:13:32 /app/backend/internal/utils/database.go:54
sale  | [1.787ms] [rows:0] CREATE TABLE `products` (`id` integer PRIMARY KEY AUTOINCREMENT,`name` text NOT NULL,`description` text,`price` decimal(10,2) NOT NULL,`min_purchase` integer DEFAULT 1,`max_purchase` integer,`min_weight` real,`max_weight` real,`min_amount` real,`max_amount` real,`require_credit` numeric DEFAULT false,`credit_cost` integer DEFAULT 0,`credit_reward` integer DEFAULT 0,`images` text,`is_active` numeric DEFAULT true,`brand_id` integer,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime,CONSTRAINT `fk_products_brand` FOREIGN KEY (`brand_id`) REFERENCES `brands`(`id`))
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.664ms] [rows:0] CREATE INDEX `idx_products_deleted_at` ON `products`(`deleted_at`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.032ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="product_categories"
sale  | 
sale  | 2026/05/25 05:13:32 /app/backend/internal/utils/database.go:54
sale  | [1.803ms] [rows:0] CREATE TABLE `product_categories` (`product_id` integer,`category_id` integer,PRIMARY KEY (`product_id`,`category_id`),CONSTRAINT `fk_product_categories_product` FOREIGN KEY (`product_id`) REFERENCES `products`(`id`),CONSTRAINT `fk_product_categories_category` FOREIGN KEY (`category_id`) REFERENCES `categories`(`id`))
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.031ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="product_custom_fields"
sale  | 
sale  | 2026/05/25 05:13:32 /app/backend/internal/utils/database.go:54
sale  | [2.133ms] [rows:0] CREATE TABLE `product_custom_fields` (`id` integer PRIMARY KEY AUTOINCREMENT,`product_id` integer NOT NULL,`field_name` text NOT NULL,`field_value` text,`created_at` datetime,CONSTRAINT `fk_products_custom_fields` FOREIGN KEY (`product_id`) REFERENCES `products`(`id`))
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.875ms] [rows:0] CREATE INDEX `idx_product_custom_fields_product_id` ON `product_custom_fields`(`product_id`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.031ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="inventory"
sale  | 
sale  | 2026/05/25 05:13:32 /app/backend/internal/utils/database.go:54
sale  | [1.744ms] [rows:0] CREATE TABLE `inventory` (`id` integer PRIMARY KEY AUTOINCREMENT,`product_id` integer NOT NULL,`supplier_id` integer NOT NULL,`quantity` integer DEFAULT 0,`updated_at` datetime)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [2.152ms] [rows:0] CREATE INDEX `idx_inventory_supplier_id` ON `inventory`(`supplier_id`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.952ms] [rows:0] CREATE INDEX `idx_inventory_product_id` ON `inventory`(`product_id`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.037ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="carts"
sale  | 
sale  | 2026/05/25 05:13:32 /app/backend/internal/utils/database.go:54
sale  | [1.982ms] [rows:0] CREATE TABLE `carts` (`id` integer PRIMARY KEY AUTOINCREMENT,`user_id` integer NOT NULL,`product_id` integer NOT NULL,`quantity` integer NOT NULL,`created_at` datetime,`updated_at` datetime,CONSTRAINT `fk_carts_product` FOREIGN KEY (`product_id`) REFERENCES `products`(`id`))
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.824ms] [rows:0] CREATE INDEX `idx_carts_product_id` ON `carts`(`product_id`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.857ms] [rows:0] CREATE INDEX `idx_carts_user_id` ON `carts`(`user_id`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.031ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="addresses"
sale  | 
sale  | 2026/05/25 05:13:32 /app/backend/internal/utils/database.go:54
sale  | [1.888ms] [rows:0] CREATE TABLE `addresses` (`id` integer PRIMARY KEY AUTOINCREMENT,`user_id` integer NOT NULL,`name` text NOT NULL,`phone` text NOT NULL,`province` text,`city` text,`district` text,`address` text NOT NULL,`is_default` numeric DEFAULT false,`created_at` datetime,`updated_at` datetime)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.821ms] [rows:0] CREATE INDEX `idx_addresses_user_id` ON `addresses`(`user_id`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.031ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="orders"
sale  | 
sale  | 2026/05/25 05:13:32 /app/backend/internal/utils/database.go:54
sale  | [2.168ms] [rows:0] CREATE TABLE `orders` (`id` integer PRIMARY KEY AUTOINCREMENT,`user_id` integer NOT NULL,`supplier_id` integer,`subtotal` decimal(10,2) NOT NULL,`shipping_fee` decimal(10,2) DEFAULT 0,`service_fee` decimal(10,2) DEFAULT 0,`tax` decimal(10,2) DEFAULT 0,`total_amount` decimal(10,2) NOT NULL,`refund_amount` decimal(10,2),`refund_status` text,`refund_reason` text,`status` text NOT NULL DEFAULT "pending_payment",`shipping_address_id` integer,`tracking_number` text,`shipping_photo` text,`express_photo` text,`customs_photo` text,`payment_method` text,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime,CONSTRAINT `fk_orders_shipping_address` FOREIGN KEY (`shipping_address_id`) REFERENCES `addresses`(`id`),CONSTRAINT `fk_orders_user` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`))
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.849ms] [rows:0] CREATE INDEX `idx_orders_deleted_at` ON `orders`(`deleted_at`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.702ms] [rows:0] CREATE INDEX `idx_orders_supplier_id` ON `orders`(`supplier_id`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.699ms] [rows:0] CREATE INDEX `idx_orders_user_id` ON `orders`(`user_id`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.039ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="order_items"
sale  | 
sale  | 2026/05/25 05:13:32 /app/backend/internal/utils/database.go:54
sale  | [1.808ms] [rows:0] CREATE TABLE `order_items` (`id` integer PRIMARY KEY AUTOINCREMENT,`order_id` integer NOT NULL,`product_id` integer NOT NULL,`quantity` integer NOT NULL,`price` decimal(10,2) NOT NULL,CONSTRAINT `fk_order_items_product` FOREIGN KEY (`product_id`) REFERENCES `products`(`id`),CONSTRAINT `fk_orders_order_items` FOREIGN KEY (`order_id`) REFERENCES `orders`(`id`))
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.797ms] [rows:0] CREATE INDEX `idx_order_items_product_id` ON `order_items`(`product_id`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.782ms] [rows:0] CREATE INDEX `idx_order_items_order_id` ON `order_items`(`order_id`)
sale  | 
sale  | 2026/05/25 05:13:32 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.033ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="lotteries"
sale  | 
sale  | 2026/05/25 05:13:32 /app/backend/internal/utils/database.go:54
sale  | [2.053ms] [rows:0] CREATE TABLE `lotteries` (`id` integer PRIMARY KEY AUTOINCREMENT,`name` text NOT NULL,`description` text,`image` text,`start_time` datetime,`end_time` datetime,`cycle` text,`daily_quota` integer,`total_quota` integer,`registration_validity` integer,`is_active` numeric DEFAULT true,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.951ms] [rows:0] CREATE INDEX `idx_lotteries_deleted_at` ON `lotteries`(`deleted_at`)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.037ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="lottery_prizes"
sale  | 
sale  | 2026/05/25 05:13:33 /app/backend/internal/utils/database.go:54
sale  | [2.128ms] [rows:0] CREATE TABLE `lottery_prizes` (`id` integer PRIMARY KEY AUTOINCREMENT,`lottery_id` integer NOT NULL,`name` text NOT NULL,`type` text NOT NULL,`quantity` integer NOT NULL,`weight` integer DEFAULT 1,`credit_reward` integer,`draw_mode` text DEFAULT "random",CONSTRAINT `fk_lotteries_prizes` FOREIGN KEY (`lottery_id`) REFERENCES `lotteries`(`id`))
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [2.107ms] [rows:0] CREATE INDEX `idx_lottery_prizes_lottery_id` ON `lottery_prizes`(`lottery_id`)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.041ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="lottery_participants"
sale  | 
sale  | 2026/05/25 05:13:33 /app/backend/internal/utils/database.go:54
sale  | [2.759ms] [rows:0] CREATE TABLE `lottery_participants` (`id` integer PRIMARY KEY AUTOINCREMENT,`lottery_id` integer NOT NULL,`user_id` integer NOT NULL,`purchase_weight` integer DEFAULT 0,`registered_at` datetime)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [2.771ms] [rows:0] CREATE INDEX `idx_lottery_participants_user_id` ON `lottery_participants`(`user_id`)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.999ms] [rows:0] CREATE INDEX `idx_lottery_participants_lottery_id` ON `lottery_participants`(`lottery_id`)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.042ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="lottery_winners"
sale  | 
sale  | 2026/05/25 05:13:33 /app/backend/internal/utils/database.go:54
sale  | [1.949ms] [rows:0] CREATE TABLE `lottery_winners` (`id` integer PRIMARY KEY AUTOINCREMENT,`lottery_id` integer NOT NULL,`prize_id` integer NOT NULL,`user_id` integer NOT NULL,`drawn_at` datetime)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [2.475ms] [rows:0] CREATE INDEX `idx_lottery_winners_user_id` ON `lottery_winners`(`user_id`)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [2.571ms] [rows:0] CREATE INDEX `idx_lottery_winners_prize_id` ON `lottery_winners`(`prize_id`)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [2.174ms] [rows:0] CREATE INDEX `idx_lottery_winners_lottery_id` ON `lottery_winners`(`lottery_id`)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.044ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="tickets"
sale  | 
sale  | 2026/05/25 05:13:33 /app/backend/internal/utils/database.go:54
sale  | [2.120ms] [rows:0] CREATE TABLE `tickets` (`id` integer PRIMARY KEY AUTOINCREMENT,`user_id` integer NOT NULL,`title` text NOT NULL,`content` text NOT NULL,`category` text,`status` text NOT NULL DEFAULT "pending",`assigned_to` integer,`reply` text,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime,CONSTRAINT `fk_tickets_user` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`),CONSTRAINT `fk_tickets_assignee` FOREIGN KEY (`assigned_to`) REFERENCES `users`(`id`))
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.795ms] [rows:0] CREATE INDEX `idx_tickets_deleted_at` ON `tickets`(`deleted_at`)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.772ms] [rows:0] CREATE INDEX `idx_tickets_user_id` ON `tickets`(`user_id`)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.035ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="system_settings"
sale  | 
sale  | 2026/05/25 05:13:33 /app/backend/internal/utils/database.go:54
sale  | [2.284ms] [rows:0] CREATE TABLE `system_settings` (`id` integer PRIMARY KEY AUTOINCREMENT,`key` text NOT NULL,`value` text,`updated_at` datetime)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.969ms] [rows:0] CREATE UNIQUE INDEX `idx_system_settings_key` ON `system_settings`(`key`)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.034ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="supplier_authorizations"
sale  | 
sale  | 2026/05/25 05:13:33 /app/backend/internal/utils/database.go:54
sale  | [1.884ms] [rows:0] CREATE TABLE `supplier_authorizations` (`id` integer PRIMARY KEY AUTOINCREMENT,`supplier_id` integer NOT NULL,`type` text NOT NULL,`ref_id` integer NOT NULL)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.844ms] [rows:0] CREATE INDEX `idx_supplier_authorizations_supplier_id` ON `supplier_authorizations`(`supplier_id`)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.038ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="articles"
sale  | 
sale  | 2026/05/25 05:13:33 /app/backend/internal/utils/database.go:54
sale  | [2.719ms] [rows:0] CREATE TABLE `articles` (`id` integer PRIMARY KEY AUTOINCREMENT,`title` text NOT NULL,`content` text NOT NULL,`summary` text,`cover_image` text,`carousel` text,`is_pinned` numeric DEFAULT false,`is_published` numeric DEFAULT true,`sort_order` integer DEFAULT 0,`author_id` integer,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime,CONSTRAINT `fk_articles_author` FOREIGN KEY (`author_id`) REFERENCES `users`(`id`))
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.838ms] [rows:0] CREATE INDEX `idx_articles_deleted_at` ON `articles`(`deleted_at`)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:32
sale  | [0.032ms] [rows:-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="banners"
sale  | 
sale  | 2026/05/25 05:13:33 /app/backend/internal/utils/database.go:54
sale  | [2.439ms] [rows:0] CREATE TABLE `banners` (`id` integer PRIMARY KEY AUTOINCREMENT,`title` text NOT NULL,`desc` text,`image` text NOT NULL,`link` text,`button` text,`bg_color` text,`sort_order` integer DEFAULT 0,`is_active` numeric DEFAULT true,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime)
sale  | 
sale  | 2026/05/25 05:13:33 /go/pkg/mod/github.com/glebarez/sqlite@v1.11.0/migrator.go:274
sale  | [1.909ms] [rows:0] CREATE INDEX `idx_banners_deleted_at` ON `banners`(`deleted_at`)
sale  | 2026/05/25 05:13:33 Database migrated successfully
sale  | 2026/05/25 05:13:33 Server starting on :8080