// This file is generated by src/actors/_scripts/generate-actor-migrations.ts.
// Source of truth is drizzle-kit output under ./drizzle (meta/_journal.json + *.sql).
// Do not hand-edit this file.

const journal = {
  entries: [
    {
      idx: 0,
      when: 1773376221152,
      tag: "0000_melted_viper",
      breakpoints: true,
    },
    {
      idx: 1,
      when: 1773638400000,
      tag: "0001_auth_index_tables",
      breakpoints: true,
    },
    {
      idx: 2,
      when: 1773720000000,
      tag: "0002_task_summaries",
      breakpoints: true,
    },
    {
      idx: 3,
      when: 1773810001000,
      tag: "0003_drop_provider_profiles",
      breakpoints: true,
    },
  ],
} as const;

export default {
  journal,
  migrations: {
    m0000: `CREATE TABLE \`app_sessions\` (
	\`id\` text PRIMARY KEY NOT NULL,
	\`current_user_id\` text,
	\`current_user_name\` text,
	\`current_user_email\` text,
	\`current_user_github_login\` text,
	\`current_user_role_label\` text,
	\`eligible_organization_ids_json\` text NOT NULL,
	\`active_organization_id\` text,
	\`github_access_token\` text,
	\`github_scope\` text NOT NULL,
	\`starter_repo_status\` text NOT NULL,
	\`starter_repo_starred_at\` integer,
	\`starter_repo_skipped_at\` integer,
	\`oauth_state\` text,
	\`oauth_state_expires_at\` integer,
	\`created_at\` integer NOT NULL,
	\`updated_at\` integer NOT NULL
);
--> statement-breakpoint
CREATE TABLE \`invoices\` (
	\`id\` text PRIMARY KEY NOT NULL,
	\`label\` text NOT NULL,
	\`issued_at\` text NOT NULL,
	\`amount_usd\` integer NOT NULL,
	\`status\` text NOT NULL,
	\`created_at\` integer NOT NULL
);
--> statement-breakpoint
CREATE TABLE \`organization_members\` (
	\`id\` text PRIMARY KEY NOT NULL,
	\`name\` text NOT NULL,
	\`email\` text NOT NULL,
	\`role\` text NOT NULL,
	\`state\` text NOT NULL,
	\`updated_at\` integer NOT NULL
);
--> statement-breakpoint
CREATE TABLE \`organization_profile\` (
	\`id\` text PRIMARY KEY NOT NULL,
	\`kind\` text NOT NULL,
	\`github_account_id\` text NOT NULL,
	\`github_login\` text NOT NULL,
	\`github_account_type\` text NOT NULL,
	\`display_name\` text NOT NULL,
	\`slug\` text NOT NULL,
	\`primary_domain\` text NOT NULL,
	\`default_model\` text NOT NULL,
	\`auto_import_repos\` integer NOT NULL,
	\`repo_import_status\` text NOT NULL,
	\`github_connected_account\` text NOT NULL,
	\`github_installation_status\` text NOT NULL,
	\`github_sync_status\` text NOT NULL,
	\`github_installation_id\` integer,
	\`github_last_sync_label\` text NOT NULL,
	\`github_last_sync_at\` integer,
	\`github_last_webhook_at\` integer,
	\`github_last_webhook_event\` text,
	\`stripe_customer_id\` text,
	\`stripe_subscription_id\` text,
	\`stripe_price_id\` text,
	\`billing_plan_id\` text NOT NULL,
	\`billing_status\` text NOT NULL,
	\`billing_seats_included\` integer NOT NULL,
	\`billing_trial_ends_at\` text,
	\`billing_renewal_at\` text,
	\`billing_payment_method_label\` text NOT NULL,
	\`created_at\` integer NOT NULL,
	\`updated_at\` integer NOT NULL
);
--> statement-breakpoint
CREATE TABLE \`repos\` (
	\`repo_id\` text PRIMARY KEY NOT NULL,
	\`remote_url\` text NOT NULL,
	\`created_at\` integer NOT NULL,
	\`updated_at\` integer NOT NULL
);
--> statement-breakpoint
CREATE TABLE \`seat_assignments\` (
	\`email\` text PRIMARY KEY NOT NULL,
	\`created_at\` integer NOT NULL
);
--> statement-breakpoint
CREATE TABLE \`stripe_lookup\` (
	\`lookup_key\` text PRIMARY KEY NOT NULL,
	\`organization_id\` text NOT NULL,
	\`updated_at\` integer NOT NULL
);
--> statement-breakpoint
CREATE TABLE \`task_lookup\` (
	\`task_id\` text PRIMARY KEY NOT NULL,
	\`repo_id\` text NOT NULL
);
`,
    m0001: `CREATE TABLE IF NOT EXISTS \`auth_session_index\` (
	\`session_id\` text PRIMARY KEY NOT NULL,
	\`session_token\` text NOT NULL,
	\`user_id\` text NOT NULL,
	\`created_at\` integer NOT NULL,
	\`updated_at\` integer NOT NULL
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS \`auth_email_index\` (
	\`email\` text PRIMARY KEY NOT NULL,
	\`user_id\` text NOT NULL,
	\`updated_at\` integer NOT NULL
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS \`auth_account_index\` (
	\`id\` text PRIMARY KEY NOT NULL,
	\`provider_id\` text NOT NULL,
	\`account_id\` text NOT NULL,
	\`user_id\` text NOT NULL,
	\`updated_at\` integer NOT NULL
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS \`auth_verification\` (
	\`id\` text PRIMARY KEY NOT NULL,
	\`identifier\` text NOT NULL,
	\`value\` text NOT NULL,
	\`expires_at\` integer NOT NULL,
	\`created_at\` integer NOT NULL,
	\`updated_at\` integer NOT NULL
);
`,
    m0002: `CREATE TABLE IF NOT EXISTS \`task_summaries\` (
	\`task_id\` text PRIMARY KEY NOT NULL,
	\`repo_id\` text NOT NULL,
	\`title\` text NOT NULL,
	\`status\` text NOT NULL,
	\`repo_name\` text NOT NULL,
	\`updated_at_ms\` integer NOT NULL,
	\`branch\` text,
	\`pull_request_json\` text,
	\`sessions_summary_json\` text DEFAULT '[]' NOT NULL
);
`,
    m0003: `DROP TABLE IF EXISTS \`provider_profiles\`;
`,
  } as const,
};
