diff --git a/README.md b/README.md index bf60acc84..3c4074da4 100644 --- a/README.md +++ b/README.md @@ -4,240 +4,144 @@
-DeployStack is an open-source CI/CD platform specifically built for MCP (Model Context Protocol) servers. Think of us as the infrastructure layer that makes MCP server deployment as simple as using n8n for automations - you select your MCP server, configure credentials, choose your target platform, and we handle all the complex deployment work behind the scenes. +DeployStack is the **Enterprise Control Plane for the Model Context Protocol (MCP) ecosystem**. It provides a secure, centralized platform to manage your company's entire AI tool landscape, eliminating credential sprawl and enabling developers to move faster and more securely. -## 🚀 Quick Start +Think of us as the **Identity and Access Management (IAM) layer for your AI agents and tools**. We solve the critical security, governance, and developer experience challenges that arise when using MCP at scale. -Get DeployStack running locally in 2 commands: +## The Problem: MCP in the Enterprise is a Security Blind Spot -```bash -curl -o docker-compose.yml https://raw.githubusercontent.com/deploystackio/deploystack/main/docker-compose.yml -DEPLOYSTACK_ENCRYPTION_SECRET=$(openssl rand -hex 16) docker-compose up -d -``` - -Access DeployStack at [http://localhost:8080](http://localhost:8080) - -> **Note**: You'll need Docker and Docker Compose installed. For detailed setup instructions, see our [Self-Hosted Documentation](https://deploystack.io/docs/deploystack/self-hosted). - -## What Makes DeployStack Different - -- **MCP-Native CI/CD**: Purpose-built for MCP server lifecycle management, not adapted from general deployment tools -- **Multi-Cloud Excellence**: Deploy MCP servers to AWS, Render.com, Fly.io, DigitalOcean, and more with one click -- **Enterprise-Ready**: Team collaboration, private catalogs, and security features for organizations -- **Community-Driven**: Open-source foundation with curated MCP server catalog -- **Developer Experience Focus**: Eliminates the technical complexity that currently limits MCP adoption +MCP is revolutionizing how AI agents use tools, but it has created a massive challenge for organizations: -## The MCP Server Deployment Problem +- **Credential Sprawl**: Developers copy and paste sensitive API keys and tokens into insecure local configuration files, creating a huge security risk. +- **No Governance**: Who is using which tools? Which agent is accessing sensitive customer data? Without a central control plane, companies are blind. +- **Developer Friction**: Developers spend hours managing complex configurations for dozens of tools, a process that is both tedious and error-prone. Onboarding a new developer is a nightmare of configuration management. +- **Inconsistent Environments**: Every developer has a slightly different local setup, leading to "it works on my machine" problems and configuration drift. -MCP servers are experiencing explosive adoption, with Claude Desktop leading the way as the primary integration point for AI agents. However, deploying MCP servers presents significant challenges that DeployStack addresses: +DeployStack was built to solve these problems head-on. -### Current Pain Points We Solve +## The Solution: A Central Control Plane with a Local Secure Gateway -**1. Technical Complexity Barriers** -Getting up and running with MCP servers is a headache for developers, with basic examples requiring hundreds of lines of code and complex dependency management +DeployStack introduces a powerful Control Plane / Data Plane architecture to bring order to the chaos. -**2. Security and Credential Management** -Users are asked to configure sensitive data in plaintext JSON files, and MCP currently lacks standardized authentication mechanisms for client-server interactions +1. **`cloud.deploystack.io` (The Control Plane)**: A centralized web UI where administrators and team leads define the entire AI tooling landscape. -**3. Production Deployment Gaps** -Most MCP servers are designed for local development, with transport protocols like stdio that won't work in production environments + - **Centralized Credential Vault**: Securely store all your MCP server credentials (API keys, tokens) in one encrypted location. + - **Access Control Policies**: Define which teams and users have permission to access which MCP Server. + - **MCP Catalog**: Manage a central catalog of all approved MCP servers (local, remote (coming soon), or third-party (coming soon)). + - **Audit & Analytics**: Gain visibility into which tools are being used, by whom, and how often. -**4. Multi-Tenant Architecture Challenges** -Current MCP servers are often single-user, and multi-tenancy (one MCP server serving multiple independent agents or users) is not much explored yet +2. **The `DeployStack Gateway` (The Local Data Plane)**: A lightweight, secure agent that runs on each developer's machine. -**5. Fragmented Discovery** -As more MCP servers are developed, mechanisms for discovering trusted and maintained servers are needed, with broader solutions for standardization still required + - **One-Time Login**: Developers log in once. The Gateway securely fetches the configurations they are authorized to use. + - **Single Local Endpoint**: The Gateway exposes a single, stable MCP endpoint on `localhost`. Developers point all their tools (VS Code, Cursor, etc.) to this one address. + - **On-Demand Process Spawning**: The Gateway automatically starts and stops local MCP servers (`stdio`-based) as needed, injecting credentials securely at runtime. It manages the processes so the developer doesn't have to. + - **Zero-Trust Proxy**: All requests, whether to a local process or a remote server, are proxied through the Gateway, enforcing security policies on every call. -## Core Features +This architecture means developers never handle sensitive credentials, and the organization gains complete visibility and control. -- **One-Click MCP Deployment**: Deploy any MCP server to production instantly across multiple cloud providers -- **Secure Credential Management**: Encrypted storage and injection of API keys, OAuth tokens, and secrets -- **Team Collaboration**: Role-based access control, shared configurations, and organizational management -- **Internal MCP Catalogs**: Private, company-specific MCP server catalogs for enterprise deployments -- **Multi-Tenant MCP Servers**: Deploy scalable MCP servers that serve multiple users and agents -- **Authentication Proxy**: Built-in OAuth handling and security gateway for MCP server access -- **Community Catalog Integration**: Seamless connection to our curated MCP server ecosystem +## 🚀 How It Works: A Quick Tour -## MCP Server Ecosystem - -DeployStack integrates with the broader MCP ecosystem to provide comprehensive infrastructure: - -- **[awesome-mcp-server](https://github.com/deploystackio/awesome-mcp-server)**: Community-curated catalog of production-ready MCP servers -- **[deploystack.io/mcp](https://deploystack.io/mcp)**: Public discovery portal for MCP servers with one-click deployment -- **[MCP Specification](https://modelcontextprotocol.io)**: Official protocol documentation and standards +1. **Admin**: Logs into `cloud.deploystack.io`, creates a team, and registers an MCP server (e.g., the `github` mcp server), storing its API token securely in the DeployStack vault. They grant the "Dev Team" access to this server. +2. **Developer**: Installs the `DeployStack Gateway` and runs `deploystack-gateway login`. They are now authenticated. +3. **Configuration Sync**: The Gateway securely downloads the configuration for the "Dev Team", including the definition for the `github` mcp server (but not the raw token). +4. **Local Development**: The developer, in VS Code, makes a call to a `github` mcp via the Gateway's local endpoint (`http://localhost:9090/mcp`). +5. **The Magic**: + - The Gateway receives the request. + - It sees it's for `github` mcp and checks if the process is running. + - If not, it spawns the `npx @github/mcp` process, securely injecting the API token from the cloud into the process environment. + - It proxies the request to the newly spawned process via `stdio` and returns the result. + - After a period of inactivity, it automatically shuts down the process to save resources. ## Getting Started -### 🚀 Quick Start with DeployStack Cloud - -The fastest way to deploy MCP servers and solve the current deployment challenges: +### For Administrators & Team Leads 1. **Sign up for free**: [cloud.deploystack.io](https://cloud.deploystack.io) -2. **Browse MCP servers**: Choose from our curated catalog of production-ready servers -3. **Configure securely**: Add your credentials through our encrypted management system -4. **One-click deploy**: Select your cloud provider and deploy with enterprise-grade security (security = still in progress) -5. **Connect to MCP Server**: Use generated connection details in Claude Desktop, VS Code, or other MCP-compatible tools - -### 🛠️ Self-Hosted Installation - -You can also run DeployStack on your own infrastructure for maximum control: - -#### Prerequisites - -- Node.js 18 or higher -- npm 8 or higher -- Docker - -#### Installation - -1. Clone the repository: - - ```bash - git clone https://github.com/deploystackio/deploystack.git - cd deploystack - ``` - -2. Install dependencies: - - ```bash - npm install - ``` - -3. Start development servers: - - Create a `services/backend/.env` file in the root directory with the following content: - - ```env - DEPLOYSTACK_FRONTEND_URL=http://localhost:5173 - DEPLOYSTACK_ENCRYPTION_SECRET=your-very-secure-32-character-secret-key-here - LOG_LEVEL=debug - ``` +2. **Create a Team**: Organize your developers and resources. +3. **Register MCP Servers**: Add your company's MCP Server to the catalog and store their credentials securely. +4. **Invite Your Team**: Have your developers install the `DeployStack Gateway`. - ```bash - # Start frontend development server - npm run dev:frontend - - # In another terminal, start backend server - npm run dev:backend - ``` +### For Developers -#### Deploying with Docker - -Alternatively, you can deploy the pre-built Docker images for the frontend and backend services. - -1. **Pull the latest images from Docker Hub:** +1. **Install the Gateway**: ```bash - docker pull deploystack/frontend:latest - docker pull deploystack/backend:latest + # Installation command coming soon + npm install -g @deploystack/gateway ``` -2. **Run the Backend Service:** - - The backend requires a persistent volume for its data (like database configuration and SQLite files). The following command maps a local directory (`./services/backend/persistent_data`) to the container's data directory. It's recommended to run this command from the root of the cloned DeployStack project directory. +2. **Login**: ```bash - docker run -d \ - -p 3000:3000 \ - -e DEPLOYSTACK_FRONTEND_URL="http://localhost:8080" \ - -e DEPLOYSTACK_ENCRYPTION_SECRET="your-very-secure-32-character-secret-key-here" \ - -v $(pwd)/services/backend/persistent_data:/app/persistent_data \ - deploystack/backend:latest + deploystack login ``` -3. **Run the Frontend Service:** +3. **Configure Your Tools**: In VS Code, Cursor, or any other MCP client, set your MCP endpoint to the local Gateway address (e.g., `http://localhost:9095/mcp`). +4. **Start Building!** All the tools your team has access to are now available automatically. - The frontend requires environment variables to connect to the backend and for other configurations. +## Roadmap - ```bash - docker run -d -p 8080:80 \ - -e VITE_DEPLOYSTACK_BACKEND_URL="http://localhost:3000" \ - -e VITE_APP_TITLE="DeployStack Instance" \ - deploystack/frontend:latest - ``` +Our roadmap is designed to build the essential infrastructure for using MCP securely at scale, focusing on the critical pillars of security, governance, and developer experience. - **Note:** - - Ensure the `VITE_DEPLOYSTACK_BACKEND_URL` points to where your backend service is accessible. If running both containers on the same Docker host, `http://localhost:3000` (or the host's IP/hostname if `localhost` doesn't resolve correctly from within the frontend container's network to the backend's exposed port) should work. - - The `$(pwd)` in the backend command assumes you are in the root of the `deploystack` project directory. Adjust the path to `services/backend/persistent_data` if running from elsewhere, or use an absolute path or a Docker named volume. +### Phase 1: Foundation (Completed) -#### Production Deployment +- **[Done]** Deployed `cloud.deploystack.io` hosted version with a robust backend and frontend. +- **[Done]** Implemented a secure user and team management system with roles and permissions. +- **[Done]** Integrated OAuth for secure logins (e.g., GitHub). +- **[Done]** Created the initial MCP Server Catalog for tool discovery. +- **[Done]** Established documentation and self-hosted Docker support. -For production deployments on a VPS or remote server, update the environment variables to use your server's IP address: +### Phase 2: The Secure Gateway (Current Focus) -**Backend:** +- **[In Progress]** Develop the `DeployStack Gateway` local application. +- **[In Progress]** Implement secure authentication and configuration synchronization between the Gateway and the cloud. +- **[To Do]** Build the on-demand `stdio` process spawning and management logic. +- **[To Do]** Add support for proxying to remote, HTTP-based MCP servers. -```bash -docker run -d \ - -p 3000:3000 \ - -e DEPLOYSTACK_FRONTEND_URL="http://YOUR_SERVER_IP:8080" \ - -e DEPLOYSTACK_ENCRYPTION_SECRET="your-very-secure-32-character-secret-key-here" \ - -v $(pwd)/services/backend/persistent_data:/app/persistent_data \ - deploystack/backend:latest -``` +### Phase 3: Enterprise Governance -**Frontend:** +- **[To Do]** Build out Audit Logging features in the cloud UI. +- **[To Do]** Develop Analytics dashboards for tool usage and performance. +- **[To Do]** Implement advanced policy controls (e.g., rate limiting, request validation). -```bash -docker run -d -p 8080:80 \ - -e VITE_DEPLOYSTACK_BACKEND_URL="http://YOUR_SERVER_IP:3000" \ - -e VITE_APP_TITLE="DeployStack Instance" \ - deploystack/frontend:latest -``` +### Phase 4: Ecosystem & Integration + +- **[To Do]** Introduce OAuth2 support for delegated authentication to backend services. +- **[To Do]** Enhance the searchable MCP Server Catalog within the cloud UI. +- **[To Do]** Deeper integration with IDEs and AI agent frameworks. ## Project Structure -This repository uses a monorepo structure optimized for MCP server deployment: +This repository uses a monorepo structure. The new `gateway` service will be added here: ```bash deploystack/ ├── services/ -│ ├── frontend/ # Vue.js frontend application -│ ├── backend/ # Fastify backend API -│ └── shared/ # Shared MCP utilities and types -├── scripts/ # MCP deployment automation scripts -├── templates/ # Cloud provider templates for MCP servers +│ ├── frontend/ # Vue.js frontend application for cloud.deploystack.io +│ ├── backend/ # Fastify backend API for the cloud control plane +│ ├── gateway/ # The local DeployStack Gateway +│ └── shared/ # Shared utilities and types └── ... ``` -## Contributing to the MCP Ecosystem +## Contributing -We welcome contributions to both the platform and the MCP server catalog: +We are excited about this new direction and welcome contributions. The most immediate need is help building the `DeployStack Gateway`. -### Contributing MCP Servers - -Add your MCP server to our community catalog: - -1. Fork [awesome-mcp-server](https://github.com/deploystackio/awesome-mcp-server) -2. Add your server following the [contribution guidelines](https://github.com/deploystackio/awesome-mcp-server/blob/main/CONTRIBUTING.md) -3. Submit a pull request - -Your MCP server will automatically appear in the DeployStack catalog once merged, with full deployment automation. - -### Contributing to the Platform - -1. Fork this repository -2. Create your feature branch (`git checkout -b feature/amazing-feature`) -3. Commit your changes following our [commit guidelines](CONTRIBUTING.md#commit-message-guidelines) -4. Push to the branch (`git push origin feature/amazing-feature`) -5. Open a Pull Request +1. Fork this repository. +2. Create your feature branch (`git checkout -b feature/gateway-stdio-spawner`). +3. Commit your changes following our [commit guidelines](CONTRIBUTING.md#commit-message-guidelines). +4. Push to the branch (`git push origin feature/gateway-stdio-spawner`). +5. Open a Pull Request. For detailed contribution guidelines, see [CONTRIBUTING.md](CONTRIBUTING.md). ## Community and Support -- **Discord**: Join our community at [discord.gg](https://discord.gg/42Ce3S7b3b) -- **GitHub Discussions**: Ask questions and share ideas about MCP server deployment -- **Documentation**: Visit [deploystack.io/docs](https://deploystack.io/docs) for comprehensive guides -- **Twitter**: Follow [@deploystack](https://twitter.com/deploystack) for MCP ecosystem updates - -## Roadmap - -View our detailed roadmap at [deploystack.io/roadmap](https://deploystack.io/roadmap). +- **Discord**: Join our community at [discord.gg/42Ce3S7b3b](https://discord.gg/42Ce3S7b3b) to discuss the new roadmap. +- **GitHub Discussions**: Ask questions and share ideas about the Enterprise Control Plane. +- **Twitter**: Follow [@deploystack](https://twitter.com/deploystack) for updates on our progress. ## License This project is licensed under the DeployStack License (DSL), a permissive license that allows for almost all uses except offering the software as a cloud service that competes with DeployStack's offerings. See the [LICENSE](LICENSE) file for details. - ---- - -**Ready to solve MCP server deployment challenges?** [Get started for free →](https://cloud.deploystack.io) diff --git a/package-lock.json b/package-lock.json index 0ec49ab5f..415960298 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1012,6 +1012,10 @@ "resolved": "services/frontend", "link": true }, + "node_modules/@deploystack/gateway": { + "resolved": "services/gateway", + "link": true + }, "node_modules/@drizzle-team/brocli": { "version": "0.10.2", "resolved": "https://registry.npmjs.org/@drizzle-team/brocli/-/brocli-0.10.2.tgz", @@ -5992,6 +5996,20 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-xevGOReSYGM7g/kUBZzPqCrR/KYAo+F0yiPc85WFTJa0MSLtyFTVTU6cJu/aV4mid7IffDIWqo69THF2o4JiEQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/strip-json-comments": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz", + "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/superagent": { "version": "8.1.9", "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-8.1.9.tgz", @@ -9227,6 +9245,16 @@ "node": ">= 0.4" } }, + "node_modules/dynamic-dedupe": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz", + "integrity": "sha512-ssuANeD+z97meYOqd50e04Ze5qp4bPqo8cCkI4TRjZkzAUgIDTrXV1R8QCdINpiI+hw14+rYazvTRdQrz0/rFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "xtend": "^4.0.0" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -16835,6 +16863,66 @@ "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", "license": "MIT" }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/rollup": { "version": "4.41.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.1.tgz", @@ -18044,6 +18132,16 @@ "nodetouch": "bin/nodetouch.js" } }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, "node_modules/ts-api-utils": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", @@ -18154,6 +18252,125 @@ } } }, + "node_modules/ts-node-dev": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ts-node-dev/-/ts-node-dev-2.0.0.tgz", + "integrity": "sha512-ywMrhCfH6M75yftYvrvNarLEY+SUXtUvU8/0Z6llrHQVBx12GiFk5sStF8UdfE/yfzk9IAq7O5EEbTQsxlBI8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.1", + "dynamic-dedupe": "^0.3.0", + "minimist": "^1.2.6", + "mkdirp": "^1.0.4", + "resolve": "^1.0.0", + "rimraf": "^2.6.1", + "source-map-support": "^0.5.12", + "tree-kill": "^1.2.2", + "ts-node": "^10.4.0", + "tsconfig": "^7.0.0" + }, + "bin": { + "ts-node-dev": "lib/bin.js", + "tsnd": "lib/bin.js" + }, + "engines": { + "node": ">=0.8.0" + }, + "peerDependencies": { + "node-notifier": "*", + "typescript": "*" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/ts-node-dev/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/ts-node-dev/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-node-dev/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/tsconfig": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz", + "integrity": "sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/strip-bom": "^3.0.0", + "@types/strip-json-comments": "0.0.30", + "strip-bom": "^3.0.0", + "strip-json-comments": "^2.0.0" + } + }, + "node_modules/tsconfig/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/tsconfig/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -19207,6 +19424,16 @@ "node": ">=12" } }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -19853,6 +20080,33 @@ "vite-plugin-vue-devtools": "^7.7.7", "vue-tsc": "^3.0.1" } + }, + "services/gateway": { + "name": "@deploystack/gateway", + "version": "0.1.0", + "license": "SEE LICENSE IN ../../LICENSE", + "devDependencies": { + "@types/node": "^20.11.24", + "ts-node-dev": "^2.0.0", + "typescript": "^5.3.3" + } + }, + "services/gateway/node_modules/@types/node": { + "version": "20.19.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.9.tgz", + "integrity": "sha512-cuVNgarYWZqxRJDQHEB58GEONhOK79QVR/qYx4S7kcUObQvUwvFnYxJuuHUKm2aieN9X3yZB4LZsuYNU1Qphsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "services/gateway/node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" } } } diff --git a/services/backend/drizzle/migrations_sqlite/0000_brave_maddog.sql b/services/backend/drizzle/migrations_sqlite/0000_brave_maddog.sql new file mode 100644 index 000000000..f32c8bab6 --- /dev/null +++ b/services/backend/drizzle/migrations_sqlite/0000_brave_maddog.sql @@ -0,0 +1,214 @@ +CREATE TABLE `authKey` ( + `id` text PRIMARY KEY NOT NULL, + `user_id` text NOT NULL, + `primary_key` text NOT NULL, + `hashed_password` text, + `expires` integer, + FOREIGN KEY (`user_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE cascade +); +--> statement-breakpoint +CREATE TABLE `authSession` ( + `id` text PRIMARY KEY NOT NULL, + `user_id` text NOT NULL, + `expires_at` integer NOT NULL, + FOREIGN KEY (`user_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE cascade +); +--> statement-breakpoint +CREATE TABLE `authUser` ( + `id` text PRIMARY KEY NOT NULL, + `username` text NOT NULL, + `email` text NOT NULL, + `auth_type` text NOT NULL, + `first_name` text, + `last_name` text, + `github_id` text, + `hashed_password` text, + `role_id` text, + `email_verified` integer DEFAULT false NOT NULL, + FOREIGN KEY (`role_id`) REFERENCES `roles`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `authUser_username_unique` ON `authUser` (`username`);--> statement-breakpoint +CREATE UNIQUE INDEX `authUser_email_unique` ON `authUser` (`email`);--> statement-breakpoint +CREATE UNIQUE INDEX `authUser_github_id_unique` ON `authUser` (`github_id`);--> statement-breakpoint +CREATE TABLE `emailVerificationTokens` ( + `id` text PRIMARY KEY NOT NULL, + `user_id` text NOT NULL, + `token_hash` text NOT NULL, + `expires_at` integer NOT NULL, + `created_at` integer NOT NULL, + FOREIGN KEY (`user_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE cascade +); +--> statement-breakpoint +CREATE TABLE `globalSettingGroups` ( + `id` text PRIMARY KEY NOT NULL, + `name` text NOT NULL, + `description` text, + `icon` text, + `sort_order` integer DEFAULT 0 NOT NULL, + `created_at` integer NOT NULL, + `updated_at` integer NOT NULL +); +--> statement-breakpoint +CREATE TABLE `globalSettings` ( + `key` text PRIMARY KEY NOT NULL, + `value` text NOT NULL, + `type` text DEFAULT 'string' NOT NULL, + `description` text, + `is_encrypted` integer DEFAULT false NOT NULL, + `group_id` text, + `created_at` integer NOT NULL, + `updated_at` integer NOT NULL, + FOREIGN KEY (`group_id`) REFERENCES `globalSettingGroups`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `mcpCategories` ( + `id` text PRIMARY KEY NOT NULL, + `name` text NOT NULL, + `description` text, + `icon` text, + `sort_order` integer DEFAULT 0 NOT NULL, + `created_at` integer NOT NULL +); +--> statement-breakpoint +CREATE UNIQUE INDEX `mcpCategories_name_unique` ON `mcpCategories` (`name`);--> statement-breakpoint +CREATE TABLE `mcpServerInstallations` ( + `id` text PRIMARY KEY NOT NULL, + `team_id` text NOT NULL, + `server_id` text NOT NULL, + `user_id` text NOT NULL, + `installation_name` text NOT NULL, + `installation_type` text DEFAULT 'local' NOT NULL, + `user_environment_variables` text, + `created_at` integer NOT NULL, + `updated_at` integer NOT NULL, + `last_used_at` integer, + FOREIGN KEY (`team_id`) REFERENCES `teams`(`id`) ON UPDATE no action ON DELETE cascade, + FOREIGN KEY (`server_id`) REFERENCES `mcpServers`(`id`) ON UPDATE no action ON DELETE cascade, + FOREIGN KEY (`user_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE INDEX `mcp_installations_team_name_idx` ON `mcpServerInstallations` (`team_id`,`installation_name`);--> statement-breakpoint +CREATE INDEX `mcp_installations_team_server_idx` ON `mcpServerInstallations` (`team_id`,`server_id`);--> statement-breakpoint +CREATE INDEX `mcp_installations_user_idx` ON `mcpServerInstallations` (`user_id`);--> statement-breakpoint +CREATE TABLE `mcpServerVersions` ( + `id` text PRIMARY KEY NOT NULL, + `server_id` text NOT NULL, + `version` text NOT NULL, + `git_commit` text, + `changelog` text, + `is_latest` integer DEFAULT false NOT NULL, + `is_stable` integer DEFAULT true NOT NULL, + `created_at` integer NOT NULL, + FOREIGN KEY (`server_id`) REFERENCES `mcpServers`(`id`) ON UPDATE no action ON DELETE cascade +); +--> statement-breakpoint +CREATE INDEX `mcp_server_versions_server_idx` ON `mcpServerVersions` (`server_id`);--> statement-breakpoint +CREATE INDEX `mcp_server_versions_latest_idx` ON `mcpServerVersions` (`is_latest`);--> statement-breakpoint +CREATE TABLE `mcpServers` ( + `id` text PRIMARY KEY NOT NULL, + `name` text NOT NULL, + `slug` text NOT NULL, + `description` text NOT NULL, + `long_description` text, + `github_url` text, + `git_branch` text DEFAULT 'main', + `homepage_url` text, + `language` text NOT NULL, + `runtime` text NOT NULL, + `runtime_min_version` text, + `installation_methods` text NOT NULL, + `tools` text NOT NULL, + `resources` text, + `prompts` text, + `visibility` text DEFAULT 'team' NOT NULL, + `owner_team_id` text, + `created_by` text NOT NULL, + `author_name` text, + `author_contact` text, + `organization` text, + `license` text, + `default_config` text, + `environment_variables` text, + `dependencies` text, + `category_id` text, + `tags` text, + `status` text DEFAULT 'active' NOT NULL, + `featured` integer DEFAULT false NOT NULL, + `created_at` integer NOT NULL, + `updated_at` integer NOT NULL, + `last_sync_at` integer, + FOREIGN KEY (`owner_team_id`) REFERENCES `teams`(`id`) ON UPDATE no action ON DELETE cascade, + FOREIGN KEY (`created_by`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`category_id`) REFERENCES `mcpCategories`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `mcpServers_slug_unique` ON `mcpServers` (`slug`);--> statement-breakpoint +CREATE INDEX `mcp_servers_visibility_idx` ON `mcpServers` (`visibility`);--> statement-breakpoint +CREATE INDEX `mcp_servers_category_idx` ON `mcpServers` (`category_id`);--> statement-breakpoint +CREATE INDEX `mcp_servers_status_idx` ON `mcpServers` (`status`);--> statement-breakpoint +CREATE INDEX `mcp_servers_owner_team_idx` ON `mcpServers` (`owner_team_id`);--> statement-breakpoint +CREATE TABLE `passwordResetTokens` ( + `id` text PRIMARY KEY NOT NULL, + `user_id` text NOT NULL, + `token_hash` text NOT NULL, + `expires_at` integer NOT NULL, + `created_at` integer NOT NULL, + FOREIGN KEY (`user_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE cascade +); +--> statement-breakpoint +CREATE TABLE `roles` ( + `id` text PRIMARY KEY NOT NULL, + `name` text NOT NULL, + `description` text, + `permissions` text NOT NULL, + `is_system_role` integer DEFAULT false NOT NULL, + `created_at` integer NOT NULL, + `updated_at` integer NOT NULL +); +--> statement-breakpoint +CREATE UNIQUE INDEX `roles_name_unique` ON `roles` (`name`);--> statement-breakpoint +CREATE TABLE `teamCloudCredentials` ( + `id` text PRIMARY KEY NOT NULL, + `team_id` text NOT NULL, + `provider_id` text NOT NULL, + `name` text NOT NULL, + `comment` text, + `credentials` text NOT NULL, + `created_by` text NOT NULL, + `created_at` integer NOT NULL, + `updated_at` integer NOT NULL, + FOREIGN KEY (`team_id`) REFERENCES `teams`(`id`) ON UPDATE no action ON DELETE cascade, + FOREIGN KEY (`created_by`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `teamMemberships` ( + `id` text PRIMARY KEY NOT NULL, + `team_id` text NOT NULL, + `user_id` text NOT NULL, + `role` text NOT NULL, + `joined_at` integer NOT NULL, + FOREIGN KEY (`team_id`) REFERENCES `teams`(`id`) ON UPDATE no action ON DELETE cascade, + FOREIGN KEY (`user_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE cascade +); +--> statement-breakpoint +CREATE TABLE `teams` ( + `id` text PRIMARY KEY NOT NULL, + `name` text NOT NULL, + `slug` text NOT NULL, + `description` text, + `owner_id` text NOT NULL, + `is_default` integer DEFAULT false NOT NULL, + `created_at` integer NOT NULL, + `updated_at` integer NOT NULL, + FOREIGN KEY (`owner_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE cascade +); +--> statement-breakpoint +CREATE UNIQUE INDEX `teams_slug_unique` ON `teams` (`slug`);--> statement-breakpoint + +-- Insert default roles (permissions will be synced by RoleSyncService on server startup) +INSERT INTO `roles` (`id`, `name`, `description`, `permissions`, `is_system_role`, `created_at`, `updated_at`) VALUES +('global_admin', 'Global Administrator', 'Full system access with user management capabilities', '[]', 1, strftime('%s', 'now') * 1000, strftime('%s', 'now') * 1000), +('global_user', 'Global User', 'Standard user with basic profile access', '[]', 1, strftime('%s', 'now') * 1000, strftime('%s', 'now') * 1000), +('team_admin', 'Team Administrator', 'Team management with member and credential access', '[]', 1, strftime('%s', 'now') * 1000, strftime('%s', 'now') * 1000), +('team_user', 'Team User', 'Basic team member with view access', '[]', 1, strftime('%s', 'now') * 1000, strftime('%s', 'now') * 1000); diff --git a/services/backend/drizzle/migrations_sqlite/0000_create_example_plugin_table.sql b/services/backend/drizzle/migrations_sqlite/0000_create_example_plugin_table.sql deleted file mode 100644 index b78680b7f..000000000 --- a/services/backend/drizzle/migrations_sqlite/0000_create_example_plugin_table.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE IF NOT EXISTS "example-plugin_example_entities" ( - "id" TEXT PRIMARY KEY NOT NULL, - "name" TEXT NOT NULL, - "description" TEXT, - "created_at" INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL -); diff --git a/services/backend/drizzle/migrations_sqlite/0000_wonderful_falcon.sql b/services/backend/drizzle/migrations_sqlite/0000_wonderful_falcon.sql deleted file mode 100644 index 6e1435f05..000000000 --- a/services/backend/drizzle/migrations_sqlite/0000_wonderful_falcon.sql +++ /dev/null @@ -1,9 +0,0 @@ -CREATE TABLE `users` ( - `id` text PRIMARY KEY NOT NULL, - `email` text NOT NULL, - `name` text, - `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_email_unique` ON `users` (`email`); \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/0001_workable_tiger_shark.sql b/services/backend/drizzle/migrations_sqlite/0001_workable_tiger_shark.sql deleted file mode 100644 index 8a776d7fe..000000000 --- a/services/backend/drizzle/migrations_sqlite/0001_workable_tiger_shark.sql +++ /dev/null @@ -1,28 +0,0 @@ -CREATE TABLE `authKey` ( - `id` text PRIMARY KEY NOT NULL, - `user_id` text NOT NULL, - `primary_key` text NOT NULL, - `hashed_password` text, - `expires` integer -); ---> statement-breakpoint -CREATE TABLE `authSession` ( - `id` text PRIMARY KEY NOT NULL, - `user_id` text NOT NULL, - `expires_at` integer NOT NULL -); ---> statement-breakpoint -CREATE TABLE `authUser` ( - `id` text PRIMARY KEY NOT NULL, - `username` text NOT NULL, - `email` text NOT NULL, - `auth_type` text NOT NULL, - `first_name` text, - `last_name` text, - `github_id` text, - `hashed_password` text -); ---> statement-breakpoint -CREATE UNIQUE INDEX `authUser_username_unique` ON `authUser` (`username`);--> statement-breakpoint -CREATE UNIQUE INDEX `authUser_email_unique` ON `authUser` (`email`);--> statement-breakpoint -CREATE UNIQUE INDEX `authUser_github_id_unique` ON `authUser` (`github_id`); \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/0002_overconfident_ozymandias.sql b/services/backend/drizzle/migrations_sqlite/0002_overconfident_ozymandias.sql deleted file mode 100644 index f192ae9b9..000000000 --- a/services/backend/drizzle/migrations_sqlite/0002_overconfident_ozymandias.sql +++ /dev/null @@ -1,36 +0,0 @@ -PRAGMA foreign_keys=OFF;--> statement-breakpoint -CREATE TABLE `__new_users` ( - `id` text PRIMARY KEY NOT NULL, - `email` text NOT NULL, - `name` text, - `created_at` integer NOT NULL, - `updated_at` integer NOT NULL -); ---> statement-breakpoint -INSERT INTO `__new_users`("id", "email", "name", "created_at", "updated_at") SELECT "id", "email", "name", "created_at", "updated_at" FROM `users`;--> statement-breakpoint -DROP TABLE `users`;--> statement-breakpoint -ALTER TABLE `__new_users` RENAME TO `users`;--> statement-breakpoint -PRAGMA foreign_keys=ON;--> statement-breakpoint -CREATE UNIQUE INDEX `users_email_unique` ON `users` (`email`);--> statement-breakpoint -CREATE TABLE `__new_authKey` ( - `id` text PRIMARY KEY NOT NULL, - `user_id` text NOT NULL, - `primary_key` text NOT NULL, - `hashed_password` text, - `expires` integer, - FOREIGN KEY (`user_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE cascade -); ---> statement-breakpoint -INSERT INTO `__new_authKey`("id", "user_id", "primary_key", "hashed_password", "expires") SELECT "id", "user_id", "primary_key", "hashed_password", "expires" FROM `authKey`;--> statement-breakpoint -DROP TABLE `authKey`;--> statement-breakpoint -ALTER TABLE `__new_authKey` RENAME TO `authKey`;--> statement-breakpoint -CREATE TABLE `__new_authSession` ( - `id` text PRIMARY KEY NOT NULL, - `user_id` text NOT NULL, - `expires_at` integer NOT NULL, - FOREIGN KEY (`user_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE cascade -); ---> statement-breakpoint -INSERT INTO `__new_authSession`("id", "user_id", "expires_at") SELECT "id", "user_id", "expires_at" FROM `authSession`;--> statement-breakpoint -DROP TABLE `authSession`;--> statement-breakpoint -ALTER TABLE `__new_authSession` RENAME TO `authSession`; \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/0003_huge_prism.sql b/services/backend/drizzle/migrations_sqlite/0003_huge_prism.sql deleted file mode 100644 index b54b6d0a4..000000000 --- a/services/backend/drizzle/migrations_sqlite/0003_huge_prism.sql +++ /dev/null @@ -1,35 +0,0 @@ -CREATE TABLE `roles` ( - `id` text PRIMARY KEY NOT NULL, - `name` text NOT NULL, - `description` text, - `permissions` text NOT NULL, - `is_system_role` integer DEFAULT false NOT NULL, - `created_at` integer NOT NULL, - `updated_at` integer NOT NULL -); ---> statement-breakpoint -CREATE UNIQUE INDEX `roles_name_unique` ON `roles` (`name`); ---> statement-breakpoint -ALTER TABLE `authUser` ADD `role_id` text REFERENCES roles(id); ---> statement-breakpoint - --- Insert default roles (permissions will be synced by RoleSyncService on server startup) -INSERT INTO `roles` (`id`, `name`, `description`, `permissions`, `is_system_role`, `created_at`, `updated_at`) VALUES -('global_admin', 'Global Administrator', 'Full system access with user management capabilities', '[]', 1, strftime('%s', 'now') * 1000, strftime('%s', 'now') * 1000), -('global_user', 'Global User', 'Standard user with basic profile access', '[]', 1, strftime('%s', 'now') * 1000, strftime('%s', 'now') * 1000), -('team_admin', 'Team Administrator', 'Team management with member and credential access', '[]', 1, strftime('%s', 'now') * 1000, strftime('%s', 'now') * 1000), -('team_user', 'Team User', 'Basic team member with view access', '[]', 1, strftime('%s', 'now') * 1000, strftime('%s', 'now') * 1000); ---> statement-breakpoint - --- Update existing users to have global_user role (all users since role_id starts as NULL) -UPDATE `authUser` SET `role_id` = 'global_user'; ---> statement-breakpoint - --- Make the first user (by creation order) a global admin -UPDATE `authUser` -SET `role_id` = 'global_admin' -WHERE `id` = ( - SELECT `id` FROM `authUser` - ORDER BY `id` ASC - LIMIT 1 -); diff --git a/services/backend/drizzle/migrations_sqlite/0004_silly_makkari.sql b/services/backend/drizzle/migrations_sqlite/0004_silly_makkari.sql deleted file mode 100644 index b55bb4adf..000000000 --- a/services/backend/drizzle/migrations_sqlite/0004_silly_makkari.sql +++ /dev/null @@ -1,21 +0,0 @@ -PRAGMA foreign_keys=OFF;--> statement-breakpoint -CREATE TABLE `__new_authUser` ( - `id` text PRIMARY KEY NOT NULL, - `username` text NOT NULL, - `email` text NOT NULL, - `auth_type` text NOT NULL, - `first_name` text, - `last_name` text, - `github_id` text, - `hashed_password` text, - `role_id` text, - FOREIGN KEY (`role_id`) REFERENCES `roles`(`id`) ON UPDATE no action ON DELETE no action -); ---> statement-breakpoint -INSERT INTO `__new_authUser`("id", "username", "email", "auth_type", "first_name", "last_name", "github_id", "hashed_password", "role_id") SELECT "id", "username", "email", "auth_type", "first_name", "last_name", "github_id", "hashed_password", "role_id" FROM `authUser`;--> statement-breakpoint -DROP TABLE `authUser`;--> statement-breakpoint -ALTER TABLE `__new_authUser` RENAME TO `authUser`;--> statement-breakpoint -PRAGMA foreign_keys=ON;--> statement-breakpoint -CREATE UNIQUE INDEX `authUser_username_unique` ON `authUser` (`username`);--> statement-breakpoint -CREATE UNIQUE INDEX `authUser_email_unique` ON `authUser` (`email`);--> statement-breakpoint -CREATE UNIQUE INDEX `authUser_github_id_unique` ON `authUser` (`github_id`); \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/0005_woozy_spencer_smythe.sql b/services/backend/drizzle/migrations_sqlite/0005_woozy_spencer_smythe.sql deleted file mode 100644 index 068db3b04..000000000 --- a/services/backend/drizzle/migrations_sqlite/0005_woozy_spencer_smythe.sql +++ /dev/null @@ -1,22 +0,0 @@ -CREATE TABLE `teamMemberships` ( - `id` text PRIMARY KEY NOT NULL, - `team_id` text NOT NULL, - `user_id` text NOT NULL, - `role` text NOT NULL, - `joined_at` integer NOT NULL, - FOREIGN KEY (`team_id`) REFERENCES `teams`(`id`) ON UPDATE no action ON DELETE cascade, - FOREIGN KEY (`user_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE cascade -); ---> statement-breakpoint -CREATE TABLE `teams` ( - `id` text PRIMARY KEY NOT NULL, - `name` text NOT NULL, - `slug` text NOT NULL, - `description` text, - `owner_id` text NOT NULL, - `created_at` integer NOT NULL, - `updated_at` integer NOT NULL, - FOREIGN KEY (`owner_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE cascade -); ---> statement-breakpoint -CREATE UNIQUE INDEX `teams_slug_unique` ON `teams` (`slug`); \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/0006_young_hellion.sql b/services/backend/drizzle/migrations_sqlite/0006_young_hellion.sql deleted file mode 100644 index e9dbdd4d1..000000000 --- a/services/backend/drizzle/migrations_sqlite/0006_young_hellion.sql +++ /dev/null @@ -1,9 +0,0 @@ -CREATE TABLE `globalSettings` ( - `key` text PRIMARY KEY NOT NULL, - `value` text NOT NULL, - `description` text, - `is_encrypted` integer DEFAULT false NOT NULL, - `category` text, - `created_at` integer NOT NULL, - `updated_at` integer NOT NULL -); diff --git a/services/backend/drizzle/migrations_sqlite/0007_open_lethal_legion.sql b/services/backend/drizzle/migrations_sqlite/0007_open_lethal_legion.sql deleted file mode 100644 index f6345d19c..000000000 --- a/services/backend/drizzle/migrations_sqlite/0007_open_lethal_legion.sql +++ /dev/null @@ -1,26 +0,0 @@ -CREATE TABLE `globalSettingGroups` ( - `id` text PRIMARY KEY NOT NULL, - `name` text NOT NULL, - `description` text, - `icon` text, - `sort_order` integer DEFAULT 0 NOT NULL, - `created_at` integer NOT NULL, - `updated_at` integer NOT NULL -); ---> statement-breakpoint -PRAGMA foreign_keys=OFF;--> statement-breakpoint -CREATE TABLE `__new_globalSettings` ( - `key` text PRIMARY KEY NOT NULL, - `value` text NOT NULL, - `description` text, - `is_encrypted` integer DEFAULT false NOT NULL, - `group_id` text, - `created_at` integer NOT NULL, - `updated_at` integer NOT NULL, - FOREIGN KEY (`group_id`) REFERENCES `globalSettingGroups`(`id`) ON UPDATE no action ON DELETE no action -); ---> statement-breakpoint -INSERT INTO `__new_globalSettings`("key", "value", "description", "is_encrypted", "group_id", "created_at", "updated_at") SELECT "key", "value", "description", "is_encrypted", "category", "created_at", "updated_at" FROM `globalSettings`;--> statement-breakpoint -DROP TABLE `globalSettings`;--> statement-breakpoint -ALTER TABLE `__new_globalSettings` RENAME TO `globalSettings`;--> statement-breakpoint -PRAGMA foreign_keys=ON; diff --git a/services/backend/drizzle/migrations_sqlite/0008_mysterious_calypso.sql b/services/backend/drizzle/migrations_sqlite/0008_mysterious_calypso.sql deleted file mode 100644 index 92871363b..000000000 --- a/services/backend/drizzle/migrations_sqlite/0008_mysterious_calypso.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `globalSettings` ADD `type` text DEFAULT 'string' NOT NULL; \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/0009_sour_the_santerians.sql b/services/backend/drizzle/migrations_sqlite/0009_sour_the_santerians.sql deleted file mode 100644 index 9ac7cd442..000000000 --- a/services/backend/drizzle/migrations_sqlite/0009_sour_the_santerians.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE `users`; \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/0010_premium_medusa.sql b/services/backend/drizzle/migrations_sqlite/0010_premium_medusa.sql deleted file mode 100644 index b3640f009..000000000 --- a/services/backend/drizzle/migrations_sqlite/0010_premium_medusa.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE `emailVerificationTokens` ( - `id` text PRIMARY KEY NOT NULL, - `user_id` text NOT NULL, - `token_hash` text NOT NULL, - `expires_at` integer NOT NULL, - `created_at` integer NOT NULL, - FOREIGN KEY (`user_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE cascade -); ---> statement-breakpoint -ALTER TABLE `authUser` ADD `email_verified` integer DEFAULT false NOT NULL; \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/0011_regular_pandemic.sql b/services/backend/drizzle/migrations_sqlite/0011_regular_pandemic.sql deleted file mode 100644 index ccda4c4eb..000000000 --- a/services/backend/drizzle/migrations_sqlite/0011_regular_pandemic.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE TABLE `passwordResetTokens` ( - `id` text PRIMARY KEY NOT NULL, - `user_id` text NOT NULL, - `token_hash` text NOT NULL, - `expires_at` integer NOT NULL, - `created_at` integer NOT NULL, - FOREIGN KEY (`user_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE cascade -); diff --git a/services/backend/drizzle/migrations_sqlite/0012_bent_ultimates.sql b/services/backend/drizzle/migrations_sqlite/0012_bent_ultimates.sql deleted file mode 100644 index 984905837..000000000 --- a/services/backend/drizzle/migrations_sqlite/0012_bent_ultimates.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `teams` ADD `is_default` integer DEFAULT false NOT NULL; \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/0013_massive_inertia.sql b/services/backend/drizzle/migrations_sqlite/0013_massive_inertia.sql deleted file mode 100644 index 246b91844..000000000 --- a/services/backend/drizzle/migrations_sqlite/0013_massive_inertia.sql +++ /dev/null @@ -1,13 +0,0 @@ -CREATE TABLE `teamCloudCredentials` ( - `id` text PRIMARY KEY NOT NULL, - `team_id` text NOT NULL, - `provider_id` text NOT NULL, - `name` text NOT NULL, - `comment` text, - `credentials` text NOT NULL, - `created_by` text NOT NULL, - `created_at` integer NOT NULL, - `updated_at` integer NOT NULL, - FOREIGN KEY (`team_id`) REFERENCES `teams`(`id`) ON UPDATE no action ON DELETE cascade, - FOREIGN KEY (`created_by`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE no action -); diff --git a/services/backend/drizzle/migrations_sqlite/0014_concerned_trish_tilby.sql b/services/backend/drizzle/migrations_sqlite/0014_concerned_trish_tilby.sql deleted file mode 100644 index 99e7d8fd0..000000000 --- a/services/backend/drizzle/migrations_sqlite/0014_concerned_trish_tilby.sql +++ /dev/null @@ -1,68 +0,0 @@ -CREATE TABLE `mcpCategories` ( - `id` text PRIMARY KEY NOT NULL, - `name` text NOT NULL, - `description` text, - `icon` text, - `sort_order` integer DEFAULT 0 NOT NULL, - `created_at` integer NOT NULL -); ---> statement-breakpoint -CREATE TABLE `mcpServerVersions` ( - `id` text PRIMARY KEY NOT NULL, - `server_id` text NOT NULL, - `version` text NOT NULL, - `git_commit` text, - `changelog` text, - `is_latest` integer DEFAULT false NOT NULL, - `is_stable` integer DEFAULT true NOT NULL, - `created_at` integer NOT NULL, - FOREIGN KEY (`server_id`) REFERENCES `mcpServers`(`id`) ON UPDATE no action ON DELETE cascade -); ---> statement-breakpoint -CREATE INDEX `mcp_server_versions_server_idx` ON `mcpServerVersions` (`server_id`);--> statement-breakpoint -CREATE INDEX `mcp_server_versions_latest_idx` ON `mcpServerVersions` (`is_latest`);--> statement-breakpoint -CREATE TABLE `mcpServers` ( - `id` text PRIMARY KEY NOT NULL, - `name` text NOT NULL, - `slug` text NOT NULL, - `description` text NOT NULL, - `long_description` text, - `github_url` text, - `git_branch` text DEFAULT 'main', - `homepage_url` text, - `language` text NOT NULL, - `runtime` text NOT NULL, - `runtime_min_version` text, - `installation_methods` text NOT NULL, - `tools` text NOT NULL, - `resources` text, - `prompts` text, - `visibility` text DEFAULT 'team' NOT NULL, - `owner_team_id` text, - `created_by` text NOT NULL, - `author_name` text, - `author_contact` text, - `organization` text, - `license` text, - `default_config` text, - `environment_variables` text, - `dependencies` text, - `category_id` text, - `tags` text, - `status` text DEFAULT 'active' NOT NULL, - `featured` integer DEFAULT false NOT NULL, - `created_at` integer NOT NULL, - `updated_at` integer NOT NULL, - `last_sync_at` integer, - FOREIGN KEY (`owner_team_id`) REFERENCES `teams`(`id`) ON UPDATE no action ON DELETE cascade, - FOREIGN KEY (`created_by`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE no action, - FOREIGN KEY (`category_id`) REFERENCES `mcpCategories`(`id`) ON UPDATE no action ON DELETE no action -); ---> statement-breakpoint -CREATE UNIQUE INDEX `mcpServers_slug_unique` ON `mcpServers` (`slug`);--> statement-breakpoint -CREATE INDEX `mcp_servers_visibility_idx` ON `mcpServers` (`visibility`);--> statement-breakpoint -CREATE INDEX `mcp_servers_category_idx` ON `mcpServers` (`category_id`);--> statement-breakpoint -CREATE INDEX `mcp_servers_status_idx` ON `mcpServers` (`status`);--> statement-breakpoint -CREATE INDEX `mcp_servers_owner_team_idx` ON `mcpServers` (`owner_team_id`);--> statement-breakpoint -INSERT INTO `mcpCategories` (`id`, `name`, `description`, `icon`, `sort_order`, `created_at`) -VALUES ('default-category-id', 'Default', 'Default category', 'Tags', 0, strftime('%s', 'now') * 1000); diff --git a/services/backend/drizzle/migrations_sqlite/0015_add_mcp_permissions_to_global_admin.sql b/services/backend/drizzle/migrations_sqlite/0015_add_mcp_permissions_to_global_admin.sql deleted file mode 100644 index a55d4c261..000000000 --- a/services/backend/drizzle/migrations_sqlite/0015_add_mcp_permissions_to_global_admin.sql +++ /dev/null @@ -1,3 +0,0 @@ --- MCP permissions are now managed by RoleSyncService on server startup --- This migration is kept for historical purposes but no longer performs any operations --- All role permissions are automatically synced from roleService.ts getDefaultPermissions() diff --git a/services/backend/drizzle/migrations_sqlite/0016_wet_blacklash.sql b/services/backend/drizzle/migrations_sqlite/0016_wet_blacklash.sql deleted file mode 100644 index 06da4635c..000000000 --- a/services/backend/drizzle/migrations_sqlite/0016_wet_blacklash.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE UNIQUE INDEX `mcpCategories_name_unique` ON `mcpCategories` (`name`); \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/0017_cultured_ghost_rider.sql b/services/backend/drizzle/migrations_sqlite/0017_cultured_ghost_rider.sql deleted file mode 100644 index 5ff11a4b6..000000000 --- a/services/backend/drizzle/migrations_sqlite/0017_cultured_ghost_rider.sql +++ /dev/null @@ -1,19 +0,0 @@ -CREATE TABLE `mcpServerInstallations` ( - `id` text PRIMARY KEY NOT NULL, - `team_id` text NOT NULL, - `server_id` text NOT NULL, - `user_id` text NOT NULL, - `installation_name` text NOT NULL, - `installation_type` text DEFAULT 'local' NOT NULL, - `user_environment_variables` text, - `created_at` integer NOT NULL, - `updated_at` integer NOT NULL, - `last_used_at` integer, - FOREIGN KEY (`team_id`) REFERENCES `teams`(`id`) ON UPDATE no action ON DELETE cascade, - FOREIGN KEY (`server_id`) REFERENCES `mcpServers`(`id`) ON UPDATE no action ON DELETE cascade, - FOREIGN KEY (`user_id`) REFERENCES `authUser`(`id`) ON UPDATE no action ON DELETE no action -); ---> statement-breakpoint -CREATE INDEX `mcp_installations_team_name_idx` ON `mcpServerInstallations` (`team_id`,`installation_name`);--> statement-breakpoint -CREATE INDEX `mcp_installations_team_server_idx` ON `mcpServerInstallations` (`team_id`,`server_id`);--> statement-breakpoint -CREATE INDEX `mcp_installations_user_idx` ON `mcpServerInstallations` (`user_id`); \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0000_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0000_snapshot.json index c253b8eeb..e37ee9ad1 100644 --- a/services/backend/drizzle/migrations_sqlite/meta/0000_snapshot.json +++ b/services/backend/drizzle/migrations_sqlite/meta/0000_snapshot.json @@ -1,11 +1,11 @@ { "version": "6", "dialect": "sqlite", - "id": "5c8a3126-7005-4e63-83e7-813a3b21f686", + "id": "948807b5-26e0-49e2-aecc-35dd18a543db", "prevId": "00000000-0000-0000-0000-000000000000", "tables": { - "users": { - "name": "users", + "authKey": { + "name": "authKey", "columns": { "id": { "name": "id", @@ -14,6 +14,117 @@ "notNull": true, "autoincrement": false }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "primary_key": { + "name": "primary_key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "hashed_password": { + "name": "hashed_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "expires": { + "name": "expires", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "authKey_user_id_authUser_id_fk": { + "name": "authKey_user_id_authUser_id_fk", + "tableFrom": "authKey", + "tableTo": "authUser", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "authSession": { + "name": "authSession", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "expires_at": { + "name": "expires_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "authSession_user_id_authUser_id_fk": { + "name": "authSession_user_id_authUser_id_fk", + "tableFrom": "authSession", + "tableTo": "authUser", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "authUser": { + "name": "authUser", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, "email": { "name": "email", "type": "text", @@ -21,35 +132,1035 @@ "notNull": true, "autoincrement": false }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "first_name": { + "name": "first_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_name": { + "name": "last_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "github_id": { + "name": "github_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "hashed_password": { + "name": "hashed_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "role_id": { + "name": "role_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "email_verified": { + "name": "email_verified", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + } + }, + "indexes": { + "authUser_username_unique": { + "name": "authUser_username_unique", + "columns": [ + "username" + ], + "isUnique": true + }, + "authUser_email_unique": { + "name": "authUser_email_unique", + "columns": [ + "email" + ], + "isUnique": true + }, + "authUser_github_id_unique": { + "name": "authUser_github_id_unique", + "columns": [ + "github_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "authUser_role_id_roles_id_fk": { + "name": "authUser_role_id_roles_id_fk", + "tableFrom": "authUser", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "emailVerificationTokens": { + "name": "emailVerificationTokens", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "token_hash": { + "name": "token_hash", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "expires_at": { + "name": "expires_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "emailVerificationTokens_user_id_authUser_id_fk": { + "name": "emailVerificationTokens_user_id_authUser_id_fk", + "tableFrom": "emailVerificationTokens", + "tableTo": "authUser", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "globalSettingGroups": { + "name": "globalSettingGroups", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "globalSettings": { + "name": "globalSettings", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'string'" + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_encrypted": { + "name": "is_encrypted", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "globalSettings_group_id_globalSettingGroups_id_fk": { + "name": "globalSettings_group_id_globalSettingGroups_id_fk", + "tableFrom": "globalSettings", + "tableTo": "globalSettingGroups", + "columnsFrom": [ + "group_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "mcpCategories": { + "name": "mcpCategories", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "mcpCategories_name_unique": { + "name": "mcpCategories_name_unique", + "columns": [ + "name" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "mcpServerInstallations": { + "name": "mcpServerInstallations", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "team_id": { + "name": "team_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "server_id": { + "name": "server_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "installation_name": { + "name": "installation_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "installation_type": { + "name": "installation_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'local'" + }, + "user_environment_variables": { + "name": "user_environment_variables", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "last_used_at": { + "name": "last_used_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "mcp_installations_team_name_idx": { + "name": "mcp_installations_team_name_idx", + "columns": [ + "team_id", + "installation_name" + ], + "isUnique": false + }, + "mcp_installations_team_server_idx": { + "name": "mcp_installations_team_server_idx", + "columns": [ + "team_id", + "server_id" + ], + "isUnique": false + }, + "mcp_installations_user_idx": { + "name": "mcp_installations_user_idx", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "mcpServerInstallations_team_id_teams_id_fk": { + "name": "mcpServerInstallations_team_id_teams_id_fk", + "tableFrom": "mcpServerInstallations", + "tableTo": "teams", + "columnsFrom": [ + "team_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcpServerInstallations_server_id_mcpServers_id_fk": { + "name": "mcpServerInstallations_server_id_mcpServers_id_fk", + "tableFrom": "mcpServerInstallations", + "tableTo": "mcpServers", + "columnsFrom": [ + "server_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcpServerInstallations_user_id_authUser_id_fk": { + "name": "mcpServerInstallations_user_id_authUser_id_fk", + "tableFrom": "mcpServerInstallations", + "tableTo": "authUser", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "mcpServerVersions": { + "name": "mcpServerVersions", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "server_id": { + "name": "server_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "git_commit": { + "name": "git_commit", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "changelog": { + "name": "changelog", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_latest": { + "name": "is_latest", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "is_stable": { + "name": "is_stable", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "mcp_server_versions_server_idx": { + "name": "mcp_server_versions_server_idx", + "columns": [ + "server_id" + ], + "isUnique": false + }, + "mcp_server_versions_latest_idx": { + "name": "mcp_server_versions_latest_idx", + "columns": [ + "is_latest" + ], + "isUnique": false + } + }, + "foreignKeys": { + "mcpServerVersions_server_id_mcpServers_id_fk": { + "name": "mcpServerVersions_server_id_mcpServers_id_fk", + "tableFrom": "mcpServerVersions", + "tableTo": "mcpServers", + "columnsFrom": [ + "server_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "mcpServers": { + "name": "mcpServers", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "long_description": { + "name": "long_description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "github_url": { + "name": "github_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "git_branch": { + "name": "git_branch", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'main'" + }, + "homepage_url": { + "name": "homepage_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "language": { + "name": "language", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "runtime": { + "name": "runtime", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "runtime_min_version": { + "name": "runtime_min_version", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "installation_methods": { + "name": "installation_methods", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tools": { + "name": "tools", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "resources": { + "name": "resources", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "prompts": { + "name": "prompts", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "visibility": { + "name": "visibility", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'team'" + }, + "owner_team_id": { + "name": "owner_team_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "author_name": { + "name": "author_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "author_contact": { + "name": "author_contact", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "organization": { + "name": "organization", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "license": { + "name": "license", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "default_config": { + "name": "default_config", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "environment_variables": { + "name": "environment_variables", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "dependencies": { + "name": "dependencies", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "category_id": { + "name": "category_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tags": { + "name": "tags", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'active'" + }, + "featured": { + "name": "featured", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "last_sync_at": { + "name": "last_sync_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "mcpServers_slug_unique": { + "name": "mcpServers_slug_unique", + "columns": [ + "slug" + ], + "isUnique": true + }, + "mcp_servers_visibility_idx": { + "name": "mcp_servers_visibility_idx", + "columns": [ + "visibility" + ], + "isUnique": false + }, + "mcp_servers_category_idx": { + "name": "mcp_servers_category_idx", + "columns": [ + "category_id" + ], + "isUnique": false + }, + "mcp_servers_status_idx": { + "name": "mcp_servers_status_idx", + "columns": [ + "status" + ], + "isUnique": false + }, + "mcp_servers_owner_team_idx": { + "name": "mcp_servers_owner_team_idx", + "columns": [ + "owner_team_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "mcpServers_owner_team_id_teams_id_fk": { + "name": "mcpServers_owner_team_id_teams_id_fk", + "tableFrom": "mcpServers", + "tableTo": "teams", + "columnsFrom": [ + "owner_team_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcpServers_created_by_authUser_id_fk": { + "name": "mcpServers_created_by_authUser_id_fk", + "tableFrom": "mcpServers", + "tableTo": "authUser", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "mcpServers_category_id_mcpCategories_id_fk": { + "name": "mcpServers_category_id_mcpCategories_id_fk", + "tableFrom": "mcpServers", + "tableTo": "mcpCategories", + "columnsFrom": [ + "category_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "passwordResetTokens": { + "name": "passwordResetTokens", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "token_hash": { + "name": "token_hash", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "expires_at": { + "name": "expires_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "passwordResetTokens_user_id_authUser_id_fk": { + "name": "passwordResetTokens_user_id_authUser_id_fk", + "tableFrom": "passwordResetTokens", + "tableTo": "authUser", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "roles": { + "name": "roles", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, "name": { "name": "name", "type": "text", "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, "notNull": false, "autoincrement": false }, + "permissions": { + "name": "permissions", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "is_system_role": { + "name": "is_system_role", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, "created_at": { "name": "created_at", "type": "integer", "primaryKey": false, "notNull": true, - "autoincrement": false, - "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + "autoincrement": false }, "updated_at": { "name": "updated_at", "type": "integer", "primaryKey": false, "notNull": true, - "autoincrement": false, - "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + "autoincrement": false } }, "indexes": { - "users_email_unique": { - "name": "users_email_unique", + "roles_name_unique": { + "name": "roles_name_unique", "columns": [ - "email" + "name" ], "isUnique": true } @@ -58,6 +1169,267 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} + }, + "teamCloudCredentials": { + "name": "teamCloudCredentials", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "team_id": { + "name": "team_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "comment": { + "name": "comment", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "credentials": { + "name": "credentials", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "teamCloudCredentials_team_id_teams_id_fk": { + "name": "teamCloudCredentials_team_id_teams_id_fk", + "tableFrom": "teamCloudCredentials", + "tableTo": "teams", + "columnsFrom": [ + "team_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "teamCloudCredentials_created_by_authUser_id_fk": { + "name": "teamCloudCredentials_created_by_authUser_id_fk", + "tableFrom": "teamCloudCredentials", + "tableTo": "authUser", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "teamMemberships": { + "name": "teamMemberships", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "team_id": { + "name": "team_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "joined_at": { + "name": "joined_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "teamMemberships_team_id_teams_id_fk": { + "name": "teamMemberships_team_id_teams_id_fk", + "tableFrom": "teamMemberships", + "tableTo": "teams", + "columnsFrom": [ + "team_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "teamMemberships_user_id_authUser_id_fk": { + "name": "teamMemberships_user_id_authUser_id_fk", + "tableFrom": "teamMemberships", + "tableTo": "authUser", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "teams": { + "name": "teams", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "owner_id": { + "name": "owner_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "is_default": { + "name": "is_default", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "teams_slug_unique": { + "name": "teams_slug_unique", + "columns": [ + "slug" + ], + "isUnique": true + } + }, + "foreignKeys": { + "teams_owner_id_authUser_id_fk": { + "name": "teams_owner_id_authUser_id_fk", + "tableFrom": "teams", + "tableTo": "authUser", + "columnsFrom": [ + "owner_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} } }, "views": {}, diff --git a/services/backend/drizzle/migrations_sqlite/meta/0001_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0001_snapshot.json deleted file mode 100644 index a16b02f91..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0001_snapshot.json +++ /dev/null @@ -1,237 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "d6eedd77-5a05-4196-80bd-d81e8a42b7f1", - "prevId": "5c8a3126-7005-4e63-83e7-813a3b21f686", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "users": { - "name": "users", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" - } - }, - "indexes": { - "users_email_unique": { - "name": "users_email_unique", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0002_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0002_snapshot.json deleted file mode 100644 index 0a030ebb1..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0002_snapshot.json +++ /dev/null @@ -1,263 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "299fd8bd-0b6d-4a21-8570-067f6a9c2579", - "prevId": "d6eedd77-5a05-4196-80bd-d81e8a42b7f1", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authKey_user_id_authUser_id_fk": { - "name": "authKey_user_id_authUser_id_fk", - "tableFrom": "authKey", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authSession_user_id_authUser_id_fk": { - "name": "authSession_user_id_authUser_id_fk", - "tableFrom": "authSession", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "users": { - "name": "users", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "users_email_unique": { - "name": "users_email_unique", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0003_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0003_snapshot.json deleted file mode 100644 index 32eb73b08..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0003_snapshot.json +++ /dev/null @@ -1,353 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "81b17e83-19db-4690-9e61-43db4ad20479", - "prevId": "299fd8bd-0b6d-4a21-8570-067f6a9c2579", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authKey_user_id_authUser_id_fk": { - "name": "authKey_user_id_authUser_id_fk", - "tableFrom": "authKey", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authSession_user_id_authUser_id_fk": { - "name": "authSession_user_id_authUser_id_fk", - "tableFrom": "authSession", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role_id": { - "name": "role_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "'global_user'" - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "authUser_role_id_roles_id_fk": { - "name": "authUser_role_id_roles_id_fk", - "tableFrom": "authUser", - "tableTo": "roles", - "columnsFrom": [ - "role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "roles": { - "name": "roles", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "permissions": { - "name": "permissions", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_system_role": { - "name": "is_system_role", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "roles_name_unique": { - "name": "roles_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "users": { - "name": "users", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "users_email_unique": { - "name": "users_email_unique", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0004_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0004_snapshot.json deleted file mode 100644 index 9fac30ede..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0004_snapshot.json +++ /dev/null @@ -1,352 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "828bf99a-8332-4769-8ebb-d8c23aa2eed7", - "prevId": "81b17e83-19db-4690-9e61-43db4ad20479", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authKey_user_id_authUser_id_fk": { - "name": "authKey_user_id_authUser_id_fk", - "tableFrom": "authKey", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authSession_user_id_authUser_id_fk": { - "name": "authSession_user_id_authUser_id_fk", - "tableFrom": "authSession", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role_id": { - "name": "role_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "authUser_role_id_roles_id_fk": { - "name": "authUser_role_id_roles_id_fk", - "tableFrom": "authUser", - "tableTo": "roles", - "columnsFrom": [ - "role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "roles": { - "name": "roles", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "permissions": { - "name": "permissions", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_system_role": { - "name": "is_system_role", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "roles_name_unique": { - "name": "roles_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "users": { - "name": "users", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "users_email_unique": { - "name": "users_email_unique", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0005_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0005_snapshot.json deleted file mode 100644 index a213b82e1..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0005_snapshot.json +++ /dev/null @@ -1,505 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "62a30077-8647-4591-a543-4e2c310d40aa", - "prevId": "828bf99a-8332-4769-8ebb-d8c23aa2eed7", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authKey_user_id_authUser_id_fk": { - "name": "authKey_user_id_authUser_id_fk", - "tableFrom": "authKey", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authSession_user_id_authUser_id_fk": { - "name": "authSession_user_id_authUser_id_fk", - "tableFrom": "authSession", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role_id": { - "name": "role_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "authUser_role_id_roles_id_fk": { - "name": "authUser_role_id_roles_id_fk", - "tableFrom": "authUser", - "tableTo": "roles", - "columnsFrom": [ - "role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "roles": { - "name": "roles", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "permissions": { - "name": "permissions", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_system_role": { - "name": "is_system_role", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "roles_name_unique": { - "name": "roles_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamMemberships": { - "name": "teamMemberships", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamMemberships_team_id_teams_id_fk": { - "name": "teamMemberships_team_id_teams_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamMemberships_user_id_authUser_id_fk": { - "name": "teamMemberships_user_id_authUser_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teams": { - "name": "teams", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner_id": { - "name": "owner_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "teams_slug_unique": { - "name": "teams_slug_unique", - "columns": [ - "slug" - ], - "isUnique": true - } - }, - "foreignKeys": { - "teams_owner_id_authUser_id_fk": { - "name": "teams_owner_id_authUser_id_fk", - "tableFrom": "teams", - "tableTo": "authUser", - "columnsFrom": [ - "owner_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "users": { - "name": "users", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "users_email_unique": { - "name": "users_email_unique", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0006_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0006_snapshot.json deleted file mode 100644 index a67940b45..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0006_snapshot.json +++ /dev/null @@ -1,565 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "ac84bfa5-8f0c-4ab4-a570-50e188692c54", - "prevId": "62a30077-8647-4591-a543-4e2c310d40aa", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authKey_user_id_authUser_id_fk": { - "name": "authKey_user_id_authUser_id_fk", - "tableFrom": "authKey", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authSession_user_id_authUser_id_fk": { - "name": "authSession_user_id_authUser_id_fk", - "tableFrom": "authSession", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role_id": { - "name": "role_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "authUser_role_id_roles_id_fk": { - "name": "authUser_role_id_roles_id_fk", - "tableFrom": "authUser", - "tableTo": "roles", - "columnsFrom": [ - "role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettings": { - "name": "globalSettings", - "columns": { - "key": { - "name": "key", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_encrypted": { - "name": "is_encrypted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "roles": { - "name": "roles", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "permissions": { - "name": "permissions", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_system_role": { - "name": "is_system_role", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "roles_name_unique": { - "name": "roles_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamMemberships": { - "name": "teamMemberships", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamMemberships_team_id_teams_id_fk": { - "name": "teamMemberships_team_id_teams_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamMemberships_user_id_authUser_id_fk": { - "name": "teamMemberships_user_id_authUser_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teams": { - "name": "teams", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner_id": { - "name": "owner_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "teams_slug_unique": { - "name": "teams_slug_unique", - "columns": [ - "slug" - ], - "isUnique": true - } - }, - "foreignKeys": { - "teams_owner_id_authUser_id_fk": { - "name": "teams_owner_id_authUser_id_fk", - "tableFrom": "teams", - "tableTo": "authUser", - "columnsFrom": [ - "owner_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "users": { - "name": "users", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "users_email_unique": { - "name": "users_email_unique", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0007_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0007_snapshot.json deleted file mode 100644 index 376c3e559..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0007_snapshot.json +++ /dev/null @@ -1,641 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "988f4517-93bf-43a2-874c-2ecd9bd092e3", - "prevId": "ac84bfa5-8f0c-4ab4-a570-50e188692c54", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authKey_user_id_authUser_id_fk": { - "name": "authKey_user_id_authUser_id_fk", - "tableFrom": "authKey", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authSession_user_id_authUser_id_fk": { - "name": "authSession_user_id_authUser_id_fk", - "tableFrom": "authSession", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role_id": { - "name": "role_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "authUser_role_id_roles_id_fk": { - "name": "authUser_role_id_roles_id_fk", - "tableFrom": "authUser", - "tableTo": "roles", - "columnsFrom": [ - "role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettingGroups": { - "name": "globalSettingGroups", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "icon": { - "name": "icon", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettings": { - "name": "globalSettings", - "columns": { - "key": { - "name": "key", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_encrypted": { - "name": "is_encrypted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "group_id": { - "name": "group_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "globalSettings_group_id_globalSettingGroups_id_fk": { - "name": "globalSettings_group_id_globalSettingGroups_id_fk", - "tableFrom": "globalSettings", - "tableTo": "globalSettingGroups", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "roles": { - "name": "roles", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "permissions": { - "name": "permissions", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_system_role": { - "name": "is_system_role", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "roles_name_unique": { - "name": "roles_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamMemberships": { - "name": "teamMemberships", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamMemberships_team_id_teams_id_fk": { - "name": "teamMemberships_team_id_teams_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamMemberships_user_id_authUser_id_fk": { - "name": "teamMemberships_user_id_authUser_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teams": { - "name": "teams", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner_id": { - "name": "owner_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "teams_slug_unique": { - "name": "teams_slug_unique", - "columns": [ - "slug" - ], - "isUnique": true - } - }, - "foreignKeys": { - "teams_owner_id_authUser_id_fk": { - "name": "teams_owner_id_authUser_id_fk", - "tableFrom": "teams", - "tableTo": "authUser", - "columnsFrom": [ - "owner_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "users": { - "name": "users", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "users_email_unique": { - "name": "users_email_unique", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": { - "\"globalSettings\".\"category\"": "\"globalSettings\".\"group_id\"" - } - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0008_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0008_snapshot.json deleted file mode 100644 index 5ab6b0c50..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0008_snapshot.json +++ /dev/null @@ -1,647 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "703159ff-03b2-4352-ac69-d89019e188f7", - "prevId": "988f4517-93bf-43a2-874c-2ecd9bd092e3", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authKey_user_id_authUser_id_fk": { - "name": "authKey_user_id_authUser_id_fk", - "tableFrom": "authKey", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authSession_user_id_authUser_id_fk": { - "name": "authSession_user_id_authUser_id_fk", - "tableFrom": "authSession", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role_id": { - "name": "role_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "authUser_role_id_roles_id_fk": { - "name": "authUser_role_id_roles_id_fk", - "tableFrom": "authUser", - "tableTo": "roles", - "columnsFrom": [ - "role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettingGroups": { - "name": "globalSettingGroups", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "icon": { - "name": "icon", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettings": { - "name": "globalSettings", - "columns": { - "key": { - "name": "key", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'string'" - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_encrypted": { - "name": "is_encrypted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "group_id": { - "name": "group_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "globalSettings_group_id_globalSettingGroups_id_fk": { - "name": "globalSettings_group_id_globalSettingGroups_id_fk", - "tableFrom": "globalSettings", - "tableTo": "globalSettingGroups", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "roles": { - "name": "roles", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "permissions": { - "name": "permissions", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_system_role": { - "name": "is_system_role", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "roles_name_unique": { - "name": "roles_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamMemberships": { - "name": "teamMemberships", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamMemberships_team_id_teams_id_fk": { - "name": "teamMemberships_team_id_teams_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamMemberships_user_id_authUser_id_fk": { - "name": "teamMemberships_user_id_authUser_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teams": { - "name": "teams", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner_id": { - "name": "owner_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "teams_slug_unique": { - "name": "teams_slug_unique", - "columns": [ - "slug" - ], - "isUnique": true - } - }, - "foreignKeys": { - "teams_owner_id_authUser_id_fk": { - "name": "teams_owner_id_authUser_id_fk", - "tableFrom": "teams", - "tableTo": "authUser", - "columnsFrom": [ - "owner_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "users": { - "name": "users", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "users_email_unique": { - "name": "users_email_unique", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0009_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0009_snapshot.json deleted file mode 100644 index 41577de39..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0009_snapshot.json +++ /dev/null @@ -1,594 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "99189af5-edc6-4a4f-b1da-d22558e2b155", - "prevId": "703159ff-03b2-4352-ac69-d89019e188f7", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authKey_user_id_authUser_id_fk": { - "name": "authKey_user_id_authUser_id_fk", - "tableFrom": "authKey", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authSession_user_id_authUser_id_fk": { - "name": "authSession_user_id_authUser_id_fk", - "tableFrom": "authSession", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role_id": { - "name": "role_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "authUser_role_id_roles_id_fk": { - "name": "authUser_role_id_roles_id_fk", - "tableFrom": "authUser", - "tableTo": "roles", - "columnsFrom": [ - "role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettingGroups": { - "name": "globalSettingGroups", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "icon": { - "name": "icon", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettings": { - "name": "globalSettings", - "columns": { - "key": { - "name": "key", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'string'" - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_encrypted": { - "name": "is_encrypted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "group_id": { - "name": "group_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "globalSettings_group_id_globalSettingGroups_id_fk": { - "name": "globalSettings_group_id_globalSettingGroups_id_fk", - "tableFrom": "globalSettings", - "tableTo": "globalSettingGroups", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "roles": { - "name": "roles", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "permissions": { - "name": "permissions", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_system_role": { - "name": "is_system_role", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "roles_name_unique": { - "name": "roles_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamMemberships": { - "name": "teamMemberships", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamMemberships_team_id_teams_id_fk": { - "name": "teamMemberships_team_id_teams_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamMemberships_user_id_authUser_id_fk": { - "name": "teamMemberships_user_id_authUser_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teams": { - "name": "teams", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner_id": { - "name": "owner_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "teams_slug_unique": { - "name": "teams_slug_unique", - "columns": [ - "slug" - ], - "isUnique": true - } - }, - "foreignKeys": { - "teams_owner_id_authUser_id_fk": { - "name": "teams_owner_id_authUser_id_fk", - "tableFrom": "teams", - "tableTo": "authUser", - "columnsFrom": [ - "owner_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0010_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0010_snapshot.json deleted file mode 100644 index a33d8cb1d..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0010_snapshot.json +++ /dev/null @@ -1,661 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "33a6665b-7a6a-4577-931e-313a5cb360bd", - "prevId": "99189af5-edc6-4a4f-b1da-d22558e2b155", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authKey_user_id_authUser_id_fk": { - "name": "authKey_user_id_authUser_id_fk", - "tableFrom": "authKey", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authSession_user_id_authUser_id_fk": { - "name": "authSession_user_id_authUser_id_fk", - "tableFrom": "authSession", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role_id": { - "name": "role_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email_verified": { - "name": "email_verified", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "authUser_role_id_roles_id_fk": { - "name": "authUser_role_id_roles_id_fk", - "tableFrom": "authUser", - "tableTo": "roles", - "columnsFrom": [ - "role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "emailVerificationTokens": { - "name": "emailVerificationTokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token_hash": { - "name": "token_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "emailVerificationTokens_user_id_authUser_id_fk": { - "name": "emailVerificationTokens_user_id_authUser_id_fk", - "tableFrom": "emailVerificationTokens", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettingGroups": { - "name": "globalSettingGroups", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "icon": { - "name": "icon", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettings": { - "name": "globalSettings", - "columns": { - "key": { - "name": "key", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'string'" - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_encrypted": { - "name": "is_encrypted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "group_id": { - "name": "group_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "globalSettings_group_id_globalSettingGroups_id_fk": { - "name": "globalSettings_group_id_globalSettingGroups_id_fk", - "tableFrom": "globalSettings", - "tableTo": "globalSettingGroups", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "roles": { - "name": "roles", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "permissions": { - "name": "permissions", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_system_role": { - "name": "is_system_role", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "roles_name_unique": { - "name": "roles_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamMemberships": { - "name": "teamMemberships", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamMemberships_team_id_teams_id_fk": { - "name": "teamMemberships_team_id_teams_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamMemberships_user_id_authUser_id_fk": { - "name": "teamMemberships_user_id_authUser_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teams": { - "name": "teams", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner_id": { - "name": "owner_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "teams_slug_unique": { - "name": "teams_slug_unique", - "columns": [ - "slug" - ], - "isUnique": true - } - }, - "foreignKeys": { - "teams_owner_id_authUser_id_fk": { - "name": "teams_owner_id_authUser_id_fk", - "tableFrom": "teams", - "tableTo": "authUser", - "columnsFrom": [ - "owner_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0011_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0011_snapshot.json deleted file mode 100644 index 186197f15..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0011_snapshot.json +++ /dev/null @@ -1,720 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "853ce8b8-8980-4119-b678-dce1fe60618b", - "prevId": "33a6665b-7a6a-4577-931e-313a5cb360bd", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authKey_user_id_authUser_id_fk": { - "name": "authKey_user_id_authUser_id_fk", - "tableFrom": "authKey", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authSession_user_id_authUser_id_fk": { - "name": "authSession_user_id_authUser_id_fk", - "tableFrom": "authSession", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role_id": { - "name": "role_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email_verified": { - "name": "email_verified", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "authUser_role_id_roles_id_fk": { - "name": "authUser_role_id_roles_id_fk", - "tableFrom": "authUser", - "tableTo": "roles", - "columnsFrom": [ - "role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "emailVerificationTokens": { - "name": "emailVerificationTokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token_hash": { - "name": "token_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "emailVerificationTokens_user_id_authUser_id_fk": { - "name": "emailVerificationTokens_user_id_authUser_id_fk", - "tableFrom": "emailVerificationTokens", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettingGroups": { - "name": "globalSettingGroups", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "icon": { - "name": "icon", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettings": { - "name": "globalSettings", - "columns": { - "key": { - "name": "key", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'string'" - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_encrypted": { - "name": "is_encrypted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "group_id": { - "name": "group_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "globalSettings_group_id_globalSettingGroups_id_fk": { - "name": "globalSettings_group_id_globalSettingGroups_id_fk", - "tableFrom": "globalSettings", - "tableTo": "globalSettingGroups", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "passwordResetTokens": { - "name": "passwordResetTokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token_hash": { - "name": "token_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "passwordResetTokens_user_id_authUser_id_fk": { - "name": "passwordResetTokens_user_id_authUser_id_fk", - "tableFrom": "passwordResetTokens", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "roles": { - "name": "roles", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "permissions": { - "name": "permissions", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_system_role": { - "name": "is_system_role", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "roles_name_unique": { - "name": "roles_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamMemberships": { - "name": "teamMemberships", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamMemberships_team_id_teams_id_fk": { - "name": "teamMemberships_team_id_teams_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamMemberships_user_id_authUser_id_fk": { - "name": "teamMemberships_user_id_authUser_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teams": { - "name": "teams", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner_id": { - "name": "owner_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "teams_slug_unique": { - "name": "teams_slug_unique", - "columns": [ - "slug" - ], - "isUnique": true - } - }, - "foreignKeys": { - "teams_owner_id_authUser_id_fk": { - "name": "teams_owner_id_authUser_id_fk", - "tableFrom": "teams", - "tableTo": "authUser", - "columnsFrom": [ - "owner_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0012_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0012_snapshot.json deleted file mode 100644 index beda78fd8..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0012_snapshot.json +++ /dev/null @@ -1,728 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "04376202-663a-43ab-bd3c-857dcc93fdcb", - "prevId": "853ce8b8-8980-4119-b678-dce1fe60618b", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authKey_user_id_authUser_id_fk": { - "name": "authKey_user_id_authUser_id_fk", - "tableFrom": "authKey", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authSession_user_id_authUser_id_fk": { - "name": "authSession_user_id_authUser_id_fk", - "tableFrom": "authSession", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role_id": { - "name": "role_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email_verified": { - "name": "email_verified", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "authUser_role_id_roles_id_fk": { - "name": "authUser_role_id_roles_id_fk", - "tableFrom": "authUser", - "tableTo": "roles", - "columnsFrom": [ - "role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "emailVerificationTokens": { - "name": "emailVerificationTokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token_hash": { - "name": "token_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "emailVerificationTokens_user_id_authUser_id_fk": { - "name": "emailVerificationTokens_user_id_authUser_id_fk", - "tableFrom": "emailVerificationTokens", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettingGroups": { - "name": "globalSettingGroups", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "icon": { - "name": "icon", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettings": { - "name": "globalSettings", - "columns": { - "key": { - "name": "key", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'string'" - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_encrypted": { - "name": "is_encrypted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "group_id": { - "name": "group_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "globalSettings_group_id_globalSettingGroups_id_fk": { - "name": "globalSettings_group_id_globalSettingGroups_id_fk", - "tableFrom": "globalSettings", - "tableTo": "globalSettingGroups", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "passwordResetTokens": { - "name": "passwordResetTokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token_hash": { - "name": "token_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "passwordResetTokens_user_id_authUser_id_fk": { - "name": "passwordResetTokens_user_id_authUser_id_fk", - "tableFrom": "passwordResetTokens", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "roles": { - "name": "roles", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "permissions": { - "name": "permissions", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_system_role": { - "name": "is_system_role", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "roles_name_unique": { - "name": "roles_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamMemberships": { - "name": "teamMemberships", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamMemberships_team_id_teams_id_fk": { - "name": "teamMemberships_team_id_teams_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamMemberships_user_id_authUser_id_fk": { - "name": "teamMemberships_user_id_authUser_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teams": { - "name": "teams", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner_id": { - "name": "owner_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_default": { - "name": "is_default", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "teams_slug_unique": { - "name": "teams_slug_unique", - "columns": [ - "slug" - ], - "isUnique": true - } - }, - "foreignKeys": { - "teams_owner_id_authUser_id_fk": { - "name": "teams_owner_id_authUser_id_fk", - "tableFrom": "teams", - "tableTo": "authUser", - "columnsFrom": [ - "owner_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0013_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0013_snapshot.json deleted file mode 100644 index 1094455c9..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0013_snapshot.json +++ /dev/null @@ -1,828 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "0290db67-2763-4070-ba45-64321c866c11", - "prevId": "04376202-663a-43ab-bd3c-857dcc93fdcb", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authKey_user_id_authUser_id_fk": { - "name": "authKey_user_id_authUser_id_fk", - "tableFrom": "authKey", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authSession_user_id_authUser_id_fk": { - "name": "authSession_user_id_authUser_id_fk", - "tableFrom": "authSession", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role_id": { - "name": "role_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email_verified": { - "name": "email_verified", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "authUser_role_id_roles_id_fk": { - "name": "authUser_role_id_roles_id_fk", - "tableFrom": "authUser", - "tableTo": "roles", - "columnsFrom": [ - "role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "emailVerificationTokens": { - "name": "emailVerificationTokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token_hash": { - "name": "token_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "emailVerificationTokens_user_id_authUser_id_fk": { - "name": "emailVerificationTokens_user_id_authUser_id_fk", - "tableFrom": "emailVerificationTokens", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettingGroups": { - "name": "globalSettingGroups", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "icon": { - "name": "icon", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettings": { - "name": "globalSettings", - "columns": { - "key": { - "name": "key", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'string'" - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_encrypted": { - "name": "is_encrypted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "group_id": { - "name": "group_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "globalSettings_group_id_globalSettingGroups_id_fk": { - "name": "globalSettings_group_id_globalSettingGroups_id_fk", - "tableFrom": "globalSettings", - "tableTo": "globalSettingGroups", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "passwordResetTokens": { - "name": "passwordResetTokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token_hash": { - "name": "token_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "passwordResetTokens_user_id_authUser_id_fk": { - "name": "passwordResetTokens_user_id_authUser_id_fk", - "tableFrom": "passwordResetTokens", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "roles": { - "name": "roles", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "permissions": { - "name": "permissions", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_system_role": { - "name": "is_system_role", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "roles_name_unique": { - "name": "roles_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamCloudCredentials": { - "name": "teamCloudCredentials", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider_id": { - "name": "provider_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "comment": { - "name": "comment", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "credentials": { - "name": "credentials", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamCloudCredentials_team_id_teams_id_fk": { - "name": "teamCloudCredentials_team_id_teams_id_fk", - "tableFrom": "teamCloudCredentials", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamCloudCredentials_created_by_authUser_id_fk": { - "name": "teamCloudCredentials_created_by_authUser_id_fk", - "tableFrom": "teamCloudCredentials", - "tableTo": "authUser", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamMemberships": { - "name": "teamMemberships", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamMemberships_team_id_teams_id_fk": { - "name": "teamMemberships_team_id_teams_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamMemberships_user_id_authUser_id_fk": { - "name": "teamMemberships_user_id_authUser_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teams": { - "name": "teams", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner_id": { - "name": "owner_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_default": { - "name": "is_default", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "teams_slug_unique": { - "name": "teams_slug_unique", - "columns": [ - "slug" - ], - "isUnique": true - } - }, - "foreignKeys": { - "teams_owner_id_authUser_id_fk": { - "name": "teams_owner_id_authUser_id_fk", - "tableFrom": "teams", - "tableTo": "authUser", - "columnsFrom": [ - "owner_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0014_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0014_snapshot.json deleted file mode 100644 index 7b5bf5b0e..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0014_snapshot.json +++ /dev/null @@ -1,1292 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "f7fa195f-7df8-4a9f-81a8-63cfc3fa5cef", - "prevId": "0290db67-2763-4070-ba45-64321c866c11", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authKey_user_id_authUser_id_fk": { - "name": "authKey_user_id_authUser_id_fk", - "tableFrom": "authKey", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authSession_user_id_authUser_id_fk": { - "name": "authSession_user_id_authUser_id_fk", - "tableFrom": "authSession", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role_id": { - "name": "role_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email_verified": { - "name": "email_verified", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "authUser_role_id_roles_id_fk": { - "name": "authUser_role_id_roles_id_fk", - "tableFrom": "authUser", - "tableTo": "roles", - "columnsFrom": [ - "role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "emailVerificationTokens": { - "name": "emailVerificationTokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token_hash": { - "name": "token_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "emailVerificationTokens_user_id_authUser_id_fk": { - "name": "emailVerificationTokens_user_id_authUser_id_fk", - "tableFrom": "emailVerificationTokens", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettingGroups": { - "name": "globalSettingGroups", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "icon": { - "name": "icon", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettings": { - "name": "globalSettings", - "columns": { - "key": { - "name": "key", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'string'" - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_encrypted": { - "name": "is_encrypted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "group_id": { - "name": "group_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "globalSettings_group_id_globalSettingGroups_id_fk": { - "name": "globalSettings_group_id_globalSettingGroups_id_fk", - "tableFrom": "globalSettings", - "tableTo": "globalSettingGroups", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "mcpCategories": { - "name": "mcpCategories", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "icon": { - "name": "icon", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "mcpServerVersions": { - "name": "mcpServerVersions", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "server_id": { - "name": "server_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "version": { - "name": "version", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "git_commit": { - "name": "git_commit", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "changelog": { - "name": "changelog", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_latest": { - "name": "is_latest", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "is_stable": { - "name": "is_stable", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "mcp_server_versions_server_idx": { - "name": "mcp_server_versions_server_idx", - "columns": [ - "server_id" - ], - "isUnique": false - }, - "mcp_server_versions_latest_idx": { - "name": "mcp_server_versions_latest_idx", - "columns": [ - "is_latest" - ], - "isUnique": false - } - }, - "foreignKeys": { - "mcpServerVersions_server_id_mcpServers_id_fk": { - "name": "mcpServerVersions_server_id_mcpServers_id_fk", - "tableFrom": "mcpServerVersions", - "tableTo": "mcpServers", - "columnsFrom": [ - "server_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "mcpServers": { - "name": "mcpServers", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "long_description": { - "name": "long_description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_url": { - "name": "github_url", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "git_branch": { - "name": "git_branch", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "'main'" - }, - "homepage_url": { - "name": "homepage_url", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "language": { - "name": "language", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "runtime": { - "name": "runtime", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "runtime_min_version": { - "name": "runtime_min_version", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "installation_methods": { - "name": "installation_methods", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tools": { - "name": "tools", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "resources": { - "name": "resources", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "prompts": { - "name": "prompts", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "visibility": { - "name": "visibility", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'team'" - }, - "owner_team_id": { - "name": "owner_team_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "author_name": { - "name": "author_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "author_contact": { - "name": "author_contact", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "organization": { - "name": "organization", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "license": { - "name": "license", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "default_config": { - "name": "default_config", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "environment_variables": { - "name": "environment_variables", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dependencies": { - "name": "dependencies", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "category_id": { - "name": "category_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "tags": { - "name": "tags", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'active'" - }, - "featured": { - "name": "featured", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_sync_at": { - "name": "last_sync_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "mcpServers_slug_unique": { - "name": "mcpServers_slug_unique", - "columns": [ - "slug" - ], - "isUnique": true - }, - "mcp_servers_visibility_idx": { - "name": "mcp_servers_visibility_idx", - "columns": [ - "visibility" - ], - "isUnique": false - }, - "mcp_servers_category_idx": { - "name": "mcp_servers_category_idx", - "columns": [ - "category_id" - ], - "isUnique": false - }, - "mcp_servers_status_idx": { - "name": "mcp_servers_status_idx", - "columns": [ - "status" - ], - "isUnique": false - }, - "mcp_servers_owner_team_idx": { - "name": "mcp_servers_owner_team_idx", - "columns": [ - "owner_team_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "mcpServers_owner_team_id_teams_id_fk": { - "name": "mcpServers_owner_team_id_teams_id_fk", - "tableFrom": "mcpServers", - "tableTo": "teams", - "columnsFrom": [ - "owner_team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "mcpServers_created_by_authUser_id_fk": { - "name": "mcpServers_created_by_authUser_id_fk", - "tableFrom": "mcpServers", - "tableTo": "authUser", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "mcpServers_category_id_mcpCategories_id_fk": { - "name": "mcpServers_category_id_mcpCategories_id_fk", - "tableFrom": "mcpServers", - "tableTo": "mcpCategories", - "columnsFrom": [ - "category_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "passwordResetTokens": { - "name": "passwordResetTokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token_hash": { - "name": "token_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "passwordResetTokens_user_id_authUser_id_fk": { - "name": "passwordResetTokens_user_id_authUser_id_fk", - "tableFrom": "passwordResetTokens", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "roles": { - "name": "roles", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "permissions": { - "name": "permissions", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_system_role": { - "name": "is_system_role", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "roles_name_unique": { - "name": "roles_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamCloudCredentials": { - "name": "teamCloudCredentials", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider_id": { - "name": "provider_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "comment": { - "name": "comment", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "credentials": { - "name": "credentials", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamCloudCredentials_team_id_teams_id_fk": { - "name": "teamCloudCredentials_team_id_teams_id_fk", - "tableFrom": "teamCloudCredentials", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamCloudCredentials_created_by_authUser_id_fk": { - "name": "teamCloudCredentials_created_by_authUser_id_fk", - "tableFrom": "teamCloudCredentials", - "tableTo": "authUser", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamMemberships": { - "name": "teamMemberships", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamMemberships_team_id_teams_id_fk": { - "name": "teamMemberships_team_id_teams_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamMemberships_user_id_authUser_id_fk": { - "name": "teamMemberships_user_id_authUser_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teams": { - "name": "teams", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner_id": { - "name": "owner_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_default": { - "name": "is_default", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "teams_slug_unique": { - "name": "teams_slug_unique", - "columns": [ - "slug" - ], - "isUnique": true - } - }, - "foreignKeys": { - "teams_owner_id_authUser_id_fk": { - "name": "teams_owner_id_authUser_id_fk", - "tableFrom": "teams", - "tableTo": "authUser", - "columnsFrom": [ - "owner_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0016_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0016_snapshot.json deleted file mode 100644 index 1aa2b5a94..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0016_snapshot.json +++ /dev/null @@ -1,1300 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "e2c31b31-5c02-49b6-8399-7e2304c7b847", - "prevId": "f7fa195f-7df8-4a9f-81a8-63cfc3fa5cef", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authKey_user_id_authUser_id_fk": { - "name": "authKey_user_id_authUser_id_fk", - "tableFrom": "authKey", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authSession_user_id_authUser_id_fk": { - "name": "authSession_user_id_authUser_id_fk", - "tableFrom": "authSession", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role_id": { - "name": "role_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email_verified": { - "name": "email_verified", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "authUser_role_id_roles_id_fk": { - "name": "authUser_role_id_roles_id_fk", - "tableFrom": "authUser", - "tableTo": "roles", - "columnsFrom": [ - "role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "emailVerificationTokens": { - "name": "emailVerificationTokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token_hash": { - "name": "token_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "emailVerificationTokens_user_id_authUser_id_fk": { - "name": "emailVerificationTokens_user_id_authUser_id_fk", - "tableFrom": "emailVerificationTokens", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettingGroups": { - "name": "globalSettingGroups", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "icon": { - "name": "icon", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettings": { - "name": "globalSettings", - "columns": { - "key": { - "name": "key", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'string'" - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_encrypted": { - "name": "is_encrypted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "group_id": { - "name": "group_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "globalSettings_group_id_globalSettingGroups_id_fk": { - "name": "globalSettings_group_id_globalSettingGroups_id_fk", - "tableFrom": "globalSettings", - "tableTo": "globalSettingGroups", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "mcpCategories": { - "name": "mcpCategories", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "icon": { - "name": "icon", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "mcpCategories_name_unique": { - "name": "mcpCategories_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "mcpServerVersions": { - "name": "mcpServerVersions", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "server_id": { - "name": "server_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "version": { - "name": "version", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "git_commit": { - "name": "git_commit", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "changelog": { - "name": "changelog", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_latest": { - "name": "is_latest", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "is_stable": { - "name": "is_stable", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "mcp_server_versions_server_idx": { - "name": "mcp_server_versions_server_idx", - "columns": [ - "server_id" - ], - "isUnique": false - }, - "mcp_server_versions_latest_idx": { - "name": "mcp_server_versions_latest_idx", - "columns": [ - "is_latest" - ], - "isUnique": false - } - }, - "foreignKeys": { - "mcpServerVersions_server_id_mcpServers_id_fk": { - "name": "mcpServerVersions_server_id_mcpServers_id_fk", - "tableFrom": "mcpServerVersions", - "tableTo": "mcpServers", - "columnsFrom": [ - "server_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "mcpServers": { - "name": "mcpServers", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "long_description": { - "name": "long_description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_url": { - "name": "github_url", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "git_branch": { - "name": "git_branch", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "'main'" - }, - "homepage_url": { - "name": "homepage_url", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "language": { - "name": "language", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "runtime": { - "name": "runtime", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "runtime_min_version": { - "name": "runtime_min_version", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "installation_methods": { - "name": "installation_methods", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tools": { - "name": "tools", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "resources": { - "name": "resources", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "prompts": { - "name": "prompts", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "visibility": { - "name": "visibility", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'team'" - }, - "owner_team_id": { - "name": "owner_team_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "author_name": { - "name": "author_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "author_contact": { - "name": "author_contact", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "organization": { - "name": "organization", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "license": { - "name": "license", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "default_config": { - "name": "default_config", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "environment_variables": { - "name": "environment_variables", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dependencies": { - "name": "dependencies", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "category_id": { - "name": "category_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "tags": { - "name": "tags", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'active'" - }, - "featured": { - "name": "featured", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_sync_at": { - "name": "last_sync_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "mcpServers_slug_unique": { - "name": "mcpServers_slug_unique", - "columns": [ - "slug" - ], - "isUnique": true - }, - "mcp_servers_visibility_idx": { - "name": "mcp_servers_visibility_idx", - "columns": [ - "visibility" - ], - "isUnique": false - }, - "mcp_servers_category_idx": { - "name": "mcp_servers_category_idx", - "columns": [ - "category_id" - ], - "isUnique": false - }, - "mcp_servers_status_idx": { - "name": "mcp_servers_status_idx", - "columns": [ - "status" - ], - "isUnique": false - }, - "mcp_servers_owner_team_idx": { - "name": "mcp_servers_owner_team_idx", - "columns": [ - "owner_team_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "mcpServers_owner_team_id_teams_id_fk": { - "name": "mcpServers_owner_team_id_teams_id_fk", - "tableFrom": "mcpServers", - "tableTo": "teams", - "columnsFrom": [ - "owner_team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "mcpServers_created_by_authUser_id_fk": { - "name": "mcpServers_created_by_authUser_id_fk", - "tableFrom": "mcpServers", - "tableTo": "authUser", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "mcpServers_category_id_mcpCategories_id_fk": { - "name": "mcpServers_category_id_mcpCategories_id_fk", - "tableFrom": "mcpServers", - "tableTo": "mcpCategories", - "columnsFrom": [ - "category_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "passwordResetTokens": { - "name": "passwordResetTokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token_hash": { - "name": "token_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "passwordResetTokens_user_id_authUser_id_fk": { - "name": "passwordResetTokens_user_id_authUser_id_fk", - "tableFrom": "passwordResetTokens", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "roles": { - "name": "roles", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "permissions": { - "name": "permissions", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_system_role": { - "name": "is_system_role", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "roles_name_unique": { - "name": "roles_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamCloudCredentials": { - "name": "teamCloudCredentials", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider_id": { - "name": "provider_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "comment": { - "name": "comment", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "credentials": { - "name": "credentials", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamCloudCredentials_team_id_teams_id_fk": { - "name": "teamCloudCredentials_team_id_teams_id_fk", - "tableFrom": "teamCloudCredentials", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamCloudCredentials_created_by_authUser_id_fk": { - "name": "teamCloudCredentials_created_by_authUser_id_fk", - "tableFrom": "teamCloudCredentials", - "tableTo": "authUser", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamMemberships": { - "name": "teamMemberships", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamMemberships_team_id_teams_id_fk": { - "name": "teamMemberships_team_id_teams_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamMemberships_user_id_authUser_id_fk": { - "name": "teamMemberships_user_id_authUser_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teams": { - "name": "teams", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner_id": { - "name": "owner_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_default": { - "name": "is_default", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "teams_slug_unique": { - "name": "teams_slug_unique", - "columns": [ - "slug" - ], - "isUnique": true - } - }, - "foreignKeys": { - "teams_owner_id_authUser_id_fk": { - "name": "teams_owner_id_authUser_id_fk", - "tableFrom": "teams", - "tableTo": "authUser", - "columnsFrom": [ - "owner_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/0017_snapshot.json b/services/backend/drizzle/migrations_sqlite/meta/0017_snapshot.json deleted file mode 100644 index a6903e969..000000000 --- a/services/backend/drizzle/migrations_sqlite/meta/0017_snapshot.json +++ /dev/null @@ -1,1445 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "59da100a-7693-44d4-b9cf-9f0f8dfb843b", - "prevId": "e2c31b31-5c02-49b6-8399-7e2304c7b847", - "tables": { - "authKey": { - "name": "authKey", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "primary_key": { - "name": "primary_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires": { - "name": "expires", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authKey_user_id_authUser_id_fk": { - "name": "authKey_user_id_authUser_id_fk", - "tableFrom": "authKey", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authSession": { - "name": "authSession", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "authSession_user_id_authUser_id_fk": { - "name": "authSession_user_id_authUser_id_fk", - "tableFrom": "authSession", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "authUser": { - "name": "authUser", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "auth_type": { - "name": "auth_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "first_name": { - "name": "first_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_name": { - "name": "last_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_id": { - "name": "github_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "hashed_password": { - "name": "hashed_password", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "role_id": { - "name": "role_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "email_verified": { - "name": "email_verified", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - } - }, - "indexes": { - "authUser_username_unique": { - "name": "authUser_username_unique", - "columns": [ - "username" - ], - "isUnique": true - }, - "authUser_email_unique": { - "name": "authUser_email_unique", - "columns": [ - "email" - ], - "isUnique": true - }, - "authUser_github_id_unique": { - "name": "authUser_github_id_unique", - "columns": [ - "github_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "authUser_role_id_roles_id_fk": { - "name": "authUser_role_id_roles_id_fk", - "tableFrom": "authUser", - "tableTo": "roles", - "columnsFrom": [ - "role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "emailVerificationTokens": { - "name": "emailVerificationTokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token_hash": { - "name": "token_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "emailVerificationTokens_user_id_authUser_id_fk": { - "name": "emailVerificationTokens_user_id_authUser_id_fk", - "tableFrom": "emailVerificationTokens", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettingGroups": { - "name": "globalSettingGroups", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "icon": { - "name": "icon", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "globalSettings": { - "name": "globalSettings", - "columns": { - "key": { - "name": "key", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'string'" - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_encrypted": { - "name": "is_encrypted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "group_id": { - "name": "group_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "globalSettings_group_id_globalSettingGroups_id_fk": { - "name": "globalSettings_group_id_globalSettingGroups_id_fk", - "tableFrom": "globalSettings", - "tableTo": "globalSettingGroups", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "mcpCategories": { - "name": "mcpCategories", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "icon": { - "name": "icon", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "mcpCategories_name_unique": { - "name": "mcpCategories_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "mcpServerInstallations": { - "name": "mcpServerInstallations", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "server_id": { - "name": "server_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "installation_name": { - "name": "installation_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "installation_type": { - "name": "installation_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'local'" - }, - "user_environment_variables": { - "name": "user_environment_variables", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_used_at": { - "name": "last_used_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "mcp_installations_team_name_idx": { - "name": "mcp_installations_team_name_idx", - "columns": [ - "team_id", - "installation_name" - ], - "isUnique": false - }, - "mcp_installations_team_server_idx": { - "name": "mcp_installations_team_server_idx", - "columns": [ - "team_id", - "server_id" - ], - "isUnique": false - }, - "mcp_installations_user_idx": { - "name": "mcp_installations_user_idx", - "columns": [ - "user_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "mcpServerInstallations_team_id_teams_id_fk": { - "name": "mcpServerInstallations_team_id_teams_id_fk", - "tableFrom": "mcpServerInstallations", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "mcpServerInstallations_server_id_mcpServers_id_fk": { - "name": "mcpServerInstallations_server_id_mcpServers_id_fk", - "tableFrom": "mcpServerInstallations", - "tableTo": "mcpServers", - "columnsFrom": [ - "server_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "mcpServerInstallations_user_id_authUser_id_fk": { - "name": "mcpServerInstallations_user_id_authUser_id_fk", - "tableFrom": "mcpServerInstallations", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "mcpServerVersions": { - "name": "mcpServerVersions", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "server_id": { - "name": "server_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "version": { - "name": "version", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "git_commit": { - "name": "git_commit", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "changelog": { - "name": "changelog", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_latest": { - "name": "is_latest", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "is_stable": { - "name": "is_stable", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": true - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "mcp_server_versions_server_idx": { - "name": "mcp_server_versions_server_idx", - "columns": [ - "server_id" - ], - "isUnique": false - }, - "mcp_server_versions_latest_idx": { - "name": "mcp_server_versions_latest_idx", - "columns": [ - "is_latest" - ], - "isUnique": false - } - }, - "foreignKeys": { - "mcpServerVersions_server_id_mcpServers_id_fk": { - "name": "mcpServerVersions_server_id_mcpServers_id_fk", - "tableFrom": "mcpServerVersions", - "tableTo": "mcpServers", - "columnsFrom": [ - "server_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "mcpServers": { - "name": "mcpServers", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "long_description": { - "name": "long_description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "github_url": { - "name": "github_url", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "git_branch": { - "name": "git_branch", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "'main'" - }, - "homepage_url": { - "name": "homepage_url", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "language": { - "name": "language", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "runtime": { - "name": "runtime", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "runtime_min_version": { - "name": "runtime_min_version", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "installation_methods": { - "name": "installation_methods", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tools": { - "name": "tools", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "resources": { - "name": "resources", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "prompts": { - "name": "prompts", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "visibility": { - "name": "visibility", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'team'" - }, - "owner_team_id": { - "name": "owner_team_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "author_name": { - "name": "author_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "author_contact": { - "name": "author_contact", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "organization": { - "name": "organization", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "license": { - "name": "license", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "default_config": { - "name": "default_config", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "environment_variables": { - "name": "environment_variables", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "dependencies": { - "name": "dependencies", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "category_id": { - "name": "category_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "tags": { - "name": "tags", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'active'" - }, - "featured": { - "name": "featured", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_sync_at": { - "name": "last_sync_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "mcpServers_slug_unique": { - "name": "mcpServers_slug_unique", - "columns": [ - "slug" - ], - "isUnique": true - }, - "mcp_servers_visibility_idx": { - "name": "mcp_servers_visibility_idx", - "columns": [ - "visibility" - ], - "isUnique": false - }, - "mcp_servers_category_idx": { - "name": "mcp_servers_category_idx", - "columns": [ - "category_id" - ], - "isUnique": false - }, - "mcp_servers_status_idx": { - "name": "mcp_servers_status_idx", - "columns": [ - "status" - ], - "isUnique": false - }, - "mcp_servers_owner_team_idx": { - "name": "mcp_servers_owner_team_idx", - "columns": [ - "owner_team_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "mcpServers_owner_team_id_teams_id_fk": { - "name": "mcpServers_owner_team_id_teams_id_fk", - "tableFrom": "mcpServers", - "tableTo": "teams", - "columnsFrom": [ - "owner_team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "mcpServers_created_by_authUser_id_fk": { - "name": "mcpServers_created_by_authUser_id_fk", - "tableFrom": "mcpServers", - "tableTo": "authUser", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "mcpServers_category_id_mcpCategories_id_fk": { - "name": "mcpServers_category_id_mcpCategories_id_fk", - "tableFrom": "mcpServers", - "tableTo": "mcpCategories", - "columnsFrom": [ - "category_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "passwordResetTokens": { - "name": "passwordResetTokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token_hash": { - "name": "token_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "passwordResetTokens_user_id_authUser_id_fk": { - "name": "passwordResetTokens_user_id_authUser_id_fk", - "tableFrom": "passwordResetTokens", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "roles": { - "name": "roles", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "permissions": { - "name": "permissions", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_system_role": { - "name": "is_system_role", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "roles_name_unique": { - "name": "roles_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamCloudCredentials": { - "name": "teamCloudCredentials", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider_id": { - "name": "provider_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "comment": { - "name": "comment", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "credentials": { - "name": "credentials", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamCloudCredentials_team_id_teams_id_fk": { - "name": "teamCloudCredentials_team_id_teams_id_fk", - "tableFrom": "teamCloudCredentials", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamCloudCredentials_created_by_authUser_id_fk": { - "name": "teamCloudCredentials_created_by_authUser_id_fk", - "tableFrom": "teamCloudCredentials", - "tableTo": "authUser", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teamMemberships": { - "name": "teamMemberships", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "team_id": { - "name": "team_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "teamMemberships_team_id_teams_id_fk": { - "name": "teamMemberships_team_id_teams_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "teams", - "columnsFrom": [ - "team_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "teamMemberships_user_id_authUser_id_fk": { - "name": "teamMemberships_user_id_authUser_id_fk", - "tableFrom": "teamMemberships", - "tableTo": "authUser", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "teams": { - "name": "teams", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner_id": { - "name": "owner_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_default": { - "name": "is_default", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "teams_slug_unique": { - "name": "teams_slug_unique", - "columns": [ - "slug" - ], - "isUnique": true - } - }, - "foreignKeys": { - "teams_owner_id_authUser_id_fk": { - "name": "teams_owner_id_authUser_id_fk", - "tableFrom": "teams", - "tableTo": "authUser", - "columnsFrom": [ - "owner_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/services/backend/drizzle/migrations_sqlite/meta/_journal.json b/services/backend/drizzle/migrations_sqlite/meta/_journal.json index 30bc29767..ebe42835b 100644 --- a/services/backend/drizzle/migrations_sqlite/meta/_journal.json +++ b/services/backend/drizzle/migrations_sqlite/meta/_journal.json @@ -5,127 +5,8 @@ { "idx": 0, "version": "6", - "when": 1748554417756, - "tag": "0000_wonderful_falcon", - "breakpoints": true - }, - { - "idx": 1, - "version": "6", - "when": 1748554510411, - "tag": "0001_workable_tiger_shark", - "breakpoints": true - }, - { - "idx": 2, - "version": "6", - "when": 1748609862894, - "tag": "0002_overconfident_ozymandias", - "breakpoints": true - }, - { - "idx": 3, - "version": "6", - "when": 1748611708544, - "tag": "0003_huge_prism", - "breakpoints": true - }, - { - "idx": 4, - "version": "6", - "when": 1748682274331, - "tag": "0004_silly_makkari", - "breakpoints": true - }, - { - "idx": 5, - "version": "6", - "when": 1748682310027, - "tag": "0005_woozy_spencer_smythe", - "breakpoints": true - }, - { - "idx": 6, - "version": "6", - "when": 1748804838926, - "tag": "0006_young_hellion", - "breakpoints": true - }, - { - "idx": 7, - "version": "6", - "when": 1748854637220, - "tag": "0007_open_lethal_legion", - "breakpoints": true - }, - { - "idx": 8, - "version": "6", - "when": 1748962499035, - "tag": "0008_mysterious_calypso", - "breakpoints": true - }, - { - "idx": 9, - "version": "6", - "when": 1749278552039, - "tag": "0009_sour_the_santerians", - "breakpoints": true - }, - { - "idx": 10, - "version": "6", - "when": 1749289899716, - "tag": "0010_premium_medusa", - "breakpoints": true - }, - { - "idx": 11, - "version": "6", - "when": 1749298979404, - "tag": "0011_regular_pandemic", - "breakpoints": true - }, - { - "idx": 12, - "version": "6", - "when": 1750957582012, - "tag": "0012_bent_ultimates", - "breakpoints": true - }, - { - "idx": 13, - "version": "6", - "when": 1751635233231, - "tag": "0013_massive_inertia", - "breakpoints": true - }, - { - "idx": 14, - "version": "6", - "when": 1751895097745, - "tag": "0014_concerned_trish_tilby", - "breakpoints": true - }, - { - "idx": 15, - "version": "6", - "when": 1751964678000, - "tag": "0015_add_mcp_permissions_to_global_admin", - "breakpoints": true - }, - { - "idx": 16, - "version": "6", - "when": 1751965160824, - "tag": "0016_wet_blacklash", - "breakpoints": true - }, - { - "idx": 17, - "version": "6", - "when": 1752585883176, - "tag": "0017_cultured_ghost_rider", + "when": 1753099079649, + "tag": "0000_brave_maddog", "breakpoints": true } ] diff --git a/services/backend/src/config/cloud-providers.ts b/services/backend/src/config/cloud-providers.ts index 25b06bfa1..1889139a6 100644 --- a/services/backend/src/config/cloud-providers.ts +++ b/services/backend/src/config/cloud-providers.ts @@ -22,58 +22,36 @@ export interface CloudProvider { } export const CLOUD_PROVIDERS: Record = { - aws: { - id: 'aws', - name: 'Amazon Web Services', - description: 'Deploy applications and services on AWS', + gcp: { + id: 'gcp', + name: 'Google Cloud Platform', + description: 'Deploy applications and services on Google Cloud', enabled: true, fields: [ { - key: 'access_key_id', - label: 'Access Key ID', - type: 'text', - required: true, - secret: false, - placeholder: 'AKIAIOSFODNN7EXAMPLE', - description: 'Your AWS Access Key ID', - validation: { - minLength: 16, - maxLength: 128, - pattern: '^AKIA[0-9A-Z]{12,}$' - } - }, - { - key: 'secret_access_key', - label: 'Secret Access Key', - type: 'password', + key: 'service_account_key', + label: 'Service Account Key (JSON)', + type: 'textarea', required: true, secret: true, - placeholder: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY', - description: 'Your AWS Secret Access Key', + placeholder: '{\n "type": "service_account",\n "project_id": "your-project-id",\n "private_key_id": "...",\n "private_key": "...",\n "client_email": "...",\n "client_id": "...",\n "auth_uri": "...",\n "token_uri": "...",\n "auth_provider_x509_cert_url": "...",\n "client_x509_cert_url": "..."\n}', + description: 'Your Google Cloud Service Account JSON key file contents', validation: { - minLength: 40, - maxLength: 128 + minLength: 100 } - } - ] - }, - render: { - id: 'render', - name: 'Render.com', - description: 'Deploy applications and services on Render', - enabled: true, - fields: [ + }, { - key: 'api_key', - label: 'API Key', - type: 'password', + key: 'project_id', + label: 'Project ID', + type: 'text', required: true, - secret: true, - placeholder: 'rnd_xxxxxxxxxxxxxxxxxx', - description: 'Your Render API key from Account Settings', + secret: false, + placeholder: 'my-gcp-project-123', + description: 'Your Google Cloud Project ID', validation: { - minLength: 20, - pattern: '^rnd_[a-zA-Z0-9]+$' + minLength: 6, + maxLength: 63, + pattern: '^[a-z][a-z0-9-]{4,61}[a-z0-9]$' } } ] diff --git a/services/backend/src/db/index.ts b/services/backend/src/db/index.ts index dbe85473a..905fed3d7 100644 --- a/services/backend/src/db/index.ts +++ b/services/backend/src/db/index.ts @@ -543,9 +543,234 @@ export function registerPluginTables(plugins: Plugin[], logger?: FastifyBaseLogg } export async function createPluginTables(plugins: Plugin[], logger: FastifyBaseLogger) { + if (!dbInstance || !isDbInitialized) { + logger.warn({ + operation: 'create_plugin_tables' + }, 'Database not initialized, skipping plugin table creation.'); + return; + } + + const pluginsWithTables = plugins.filter(plugin => + plugin.databaseExtension && plugin.databaseExtension.tableDefinitions + ); + + if (pluginsWithTables.length === 0) { + logger.info({ + operation: 'create_plugin_tables' + }, 'No plugins with table definitions found.'); + return; + } + + logger.info({ + operation: 'create_plugin_tables', + pluginCount: pluginsWithTables.length + }, `Creating tables for ${pluginsWithTables.length} plugins...`); + + for (const plugin of pluginsWithTables) { + const ext = plugin.databaseExtension as DatabaseExtensionWithTables; + if (!ext.tableDefinitions) continue; + + for (const [tableName, columnDefs] of Object.entries(ext.tableDefinitions)) { + const fullTableName = `${plugin.meta.id}_${tableName}`; + + try { + // Generate CREATE TABLE SQL dynamically + const createTableSQL = generateCreateTableSQL(fullTableName, columnDefs); + + logger.debug({ + operation: 'create_plugin_tables', + pluginId: plugin.meta.id, + tableName: fullTableName, + sql: createTableSQL + }, `Creating plugin table: ${fullTableName}`); + + // Drop the table first to ensure clean recreation (for development) + const dropTableSQL = `DROP TABLE IF EXISTS "${fullTableName}"`; + + logger.debug({ + operation: 'create_plugin_tables', + pluginId: plugin.meta.id, + tableName: fullTableName, + sql: dropTableSQL + }, `Dropping existing plugin table: ${fullTableName}`); + + // Execute the DROP TABLE statement + if (dbConfig?.type === 'sqlite') { + (dbInstance as any).$client.exec(dropTableSQL); + } else if (dbConfig?.type === 'turso') { + if ((dbInstance as any).$client && typeof (dbInstance as any).$client.execute === 'function') { + await (dbInstance as any).$client.execute(dropTableSQL); + } else { + await dbInstance.run(dropTableSQL); + } + } + + // Execute the CREATE TABLE statement + if (dbConfig?.type === 'sqlite') { + (dbInstance as any).$client.exec(createTableSQL); + } else if (dbConfig?.type === 'turso') { + if ((dbInstance as any).$client && typeof (dbInstance as any).$client.execute === 'function') { + await (dbInstance as any).$client.execute(createTableSQL); + } else { + await dbInstance.run(createTableSQL); + } + } + + logger.info({ + operation: 'create_plugin_tables', + pluginId: plugin.meta.id, + tableName: fullTableName + }, `✅ Created plugin table: ${fullTableName}`); + + } catch (error) { + const typedError = error as Error; + // Check if table already exists (not an error) + if (typedError.message.includes('already exists') || typedError.message.includes('table') && typedError.message.includes('already')) { + logger.debug({ + operation: 'create_plugin_tables', + pluginId: plugin.meta.id, + tableName: fullTableName + }, `Table ${fullTableName} already exists, skipping.`); + } else { + logger.error({ + operation: 'create_plugin_tables', + pluginId: plugin.meta.id, + tableName: fullTableName, + error: typedError, + message: typedError.message + }, `❌ Failed to create plugin table: ${fullTableName}`); + throw error; + } + } + } + } + logger.info({ operation: 'create_plugin_tables' - }, 'Plugin tables are handled by migrations.'); + }, '✅ Plugin table creation completed.'); +} + +/** + * Generate CREATE TABLE SQL from plugin table definitions + */ +function generateCreateTableSQL(tableName: string, columnDefs: Record any>): string { + const columns: string[] = []; + + for (const [columnName, columnDefFunc] of Object.entries(columnDefs)) { + // Create a mock column builder to extract column definition + const mockBuilder = createMockColumnBuilder(); + const columnDef = columnDefFunc(mockBuilder); + + // Convert the column definition to SQL + const sqlColumn = convertColumnDefToSQL(columnName, columnDef); + columns.push(sqlColumn); + } + + return `CREATE TABLE IF NOT EXISTS "${tableName}" (\n ${columns.join(',\n ')}\n)`; +} + +/** + * Create a mock column builder that captures column definition details + */ +function createMockColumnBuilder() { + const createColumn = (type: string) => { + const column = { + type, + isPrimaryKey: false, + isNotNull: false, + isUnique: false, + defaultValue: undefined as any, + references: undefined as any, + }; + + return { + ...column, + primaryKey() { + column.isPrimaryKey = true; + return this; + }, + + notNull() { + column.isNotNull = true; + return this; + }, + + unique() { + column.isUnique = true; + return this; + }, + + default(value: any) { + column.defaultValue = value; + return this; + }, + + defaultNow() { + column.defaultValue = "strftime('%s', 'now')"; + return this; + }, + + references(ref: any) { + column.references = ref; + return this; + } + }; + }; + + return (columnName: string, options?: any) => { + // Determine column type based on name patterns and options + let type = 'TEXT'; + + if (options?.mode === 'timestamp' || columnName.toLowerCase().includes('at') || columnName.toLowerCase().includes('date')) { + type = 'INTEGER'; // SQLite uses INTEGER for timestamps + } else if (columnName.toLowerCase().includes('id') || columnName.toLowerCase().includes('count') || + columnName.toLowerCase().includes('age') || columnName.toLowerCase().includes('quantity') || + columnName.toLowerCase().includes('order') || columnName.toLowerCase().includes('number')) { + type = 'INTEGER'; + } + + const column = createColumn(type); + + // For timestamp columns with mode, automatically set default if not already set + if (options?.mode === 'timestamp' && !column.defaultValue) { + column.defaultValue = "strftime('%s', 'now')"; + } + + return column; + }; +} + +/** + * Convert column definition object to SQL string + */ +function convertColumnDefToSQL(columnName: string, columnDef: any): string { + let sql = `"${columnName}" ${columnDef.type}`; + + if (columnDef.isPrimaryKey) { + sql += ' PRIMARY KEY'; + } + + if (columnDef.isNotNull) { + sql += ' NOT NULL'; + } + + if (columnDef.isUnique) { + sql += ' UNIQUE'; + } + + if (columnDef.defaultValue !== undefined) { + if (typeof columnDef.defaultValue === 'string' && columnDef.defaultValue.includes('strftime')) { + sql += ` DEFAULT (${columnDef.defaultValue})`; + } else if (typeof columnDef.defaultValue === 'string') { + sql += ` DEFAULT '${columnDef.defaultValue}'`; + } else if (typeof columnDef.defaultValue === 'boolean') { + sql += ` DEFAULT ${columnDef.defaultValue ? 1 : 0}`; + } else { + sql += ` DEFAULT ${columnDef.defaultValue}`; + } + } + + return sql; } export async function initializePluginDatabases(db: AnyDatabase, plugins: Plugin[], logger: FastifyBaseLogger) { diff --git a/services/backend/src/plugins/example-plugin/index.ts b/services/backend/src/plugins/example-plugin/index.ts index 997a4fc10..f247500d1 100644 --- a/services/backend/src/plugins/example-plugin/index.ts +++ b/services/backend/src/plugins/example-plugin/index.ts @@ -29,7 +29,7 @@ const examplePluginTableDefinitions = { id: (b: any) => b('id').primaryKey(), name: (b: any) => b('name').notNull(), description: (b: any) => b('description'), - createdAt: (b: any) => b('created_at', { mode: 'timestamp' }).notNull().defaultNow(), // Use defaultNow for portability + created_at: (b: any) => b('created_at', { mode: 'timestamp' }).notNull().defaultNow(), // Use defaultNow for portability } }; diff --git a/services/frontend/src/components/HelloWorld.vue b/services/frontend/src/components/HelloWorld.vue deleted file mode 100644 index d174cf8e1..000000000 --- a/services/frontend/src/components/HelloWorld.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - diff --git a/services/frontend/src/components/mcp-server/EnvironmentVariableCard.vue b/services/frontend/src/components/mcp-server/EnvironmentVariableCard.vue new file mode 100644 index 000000000..eb4dd41d7 --- /dev/null +++ b/services/frontend/src/components/mcp-server/EnvironmentVariableCard.vue @@ -0,0 +1,380 @@ + + +