CREATE TABLE `usage_ledger` ( `organization_id` text PRIMARY KEY NOT NULL, `period_month` text NOT NULL, `credits_used` integer DEFAULT 0 NOT NULL, `updated_at` text DEFAULT (current_timestamp) NOT NULL, FOREIGN KEY (`organization_id`) REFERENCES `organization`(`id`) ON UPDATE no action ON DELETE cascade );