-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Introspection get_sequences() NotImplementedError #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- When running migrate_schemas command that applies a migration to change the primary key field of a model from `AutoField` to `BigAutoField`, we get the following error: `NotImplementedError: subclasses of BaseDatabaseIntrospection may require a get_sequences() method` - Apparently this method is not implemented in the tenant schemas backend yet, but is expected by Django 4.2. - This commit adds that method by refering to a pull request on the original project, bernardopires#567.
WalkthroughThe pull request adds a new SQL query and a method to the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Introspection
participant DB
Client->>Introspection: Call get_sequences(cursor, table_name)
Introspection->>Introspection: Build _get_sequences_query
Introspection->>DB: Execute query via cursor
DB-->>Introspection: Return sequence metadata
Introspection-->>Client: Return list of sequence dictionaries
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (2)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
AutoFieldtoBigAutoField, we get the following error:NotImplementedError: subclasses of BaseDatabaseIntrospection may require a get_sequences() methodAdded get_sequences so command flush works bernardopires/django-tenant-schemas#567.