- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1
Enhance GaussDB-Django Integration with Non-Root User Support, Testing Infrastructure, and JSON Field Enhancements #4
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
          
     Merged
      
      
    Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    …yproject.toml, tox.ini, and TiDB settings for GaussDB Django backend.
…, updating scripts and settings, and limiting tests to backends app.
…o_tests_dir instead of the entire directory.
…backup file, update cursor classes in base.py, and modify GaussDB settings for port, user, auto field, and add cache configuration.
… GaussDB backend to use gaussdb module, and add environment setup and batched insert patch in gaussdb_settings.py.
…UNNEST optimization, updating import paths, and reverting to default host/port in gaussdb_settings.py.
…rect compiler_module path in operations.py.
…olumns by escaping percentage sign in LIKE clause.
… to sql_drop_identity.
…erations and foreign key handling to support schema alterations.
…oving custom column operations, and add Django settings for apps, middleware, templates, logging, and manage.py.
…ng handling and enhance schema.py with custom add_field logic for non-null fields.
…BindingCursor in base.py, adjust compiler.py to remove PostgreSQL-specific flag, update features.py to disable certain GaussDB features, and simplify schema.py by removing custom add_field logic.
…nflict handling in GaussDB Django
…al, add feature flag, and change default GaussDB host/port
…to remove identity column usage, adjust database features, and update settings for safer tempfile handling and host/port configuration.
…ort and schema improvements
…DB features; update datetime cast SQL and switch to localhost in GaussDB settings.
…date test suite script
…est apps, and enhance GaussDB settings
… and adjust lint settings
…uirements/gaussdb.txt
…tory from linting
…e GaussDB JSON support
…SON and type casting support
…and enhance GaussDBSQLCompiler for JSON handling
…t suite configuration
…ld support, and bump version to 5.2.0
… pooling, and adjust database features
…_to_empty converter
…tabase features, and expanded test apps
…sition, and schema operations
…jango to 4.2.0, and fix migration issues
… support and improved setup instructions
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Description
This pull request consolidates multiple commits on the
stable-4.2.xbranch, focusing on improving the GaussDB-Django backend, enhancing testing infrastructure, and adding support for non-root users. Key changes include initializing the GaussDB backend by adapting PostgreSQL code, refining installation scripts, updating READMEs with detailed guides, and enhancing JSON field support. The commits also address test app configurations, schema editor improvements, and CI workflow setup, ensuring robust integration with Django and Wagtail.The changes improve usability, performance, and compatibility for non-root users, streamline testing, and ensure the backend supports advanced database features like JSON fields and recursive many-to-many relationships.
Changes Made
Backend Initialization and Schema Enhancements:
parse_indexdefmethod signature and corrected SQL patterns inintrospection.py.schema.pywith new SQL templates for column operations and fixedsql_drop_identitytypo.gaussdband added timezone support.CharField/TextFieldto handleNoneas empty strings.Testing Infrastructure:
admin_changelist,admin_filters,proxy_models,model_fields,constraints, anddb_functions.django_test_suite.shto patch test cases for GaussDB empty string handling and removed PostgreSQL dependencies.tox.iniby removing unnecessary directories and setting Django version tostable/4.2.x.django_test_apps.txtto dynamically check GaussDB version for JSON field support and fixed typos (e.g.,or_lookupsmodel_fieldstoor_lookups).Installation and Documentation:
README.mdwith detailed GaussDB-Django installation guide, PyPI instructions, and Python version recommendations.wagtail_README.mdwith Wagtail deployment guide, non-root user setup, and example images.install_gaussdb_driver.shfor user-level installation, removingsudowhere possible and configuringLD_LIBRARY_PATHin~/.bashrc..bakfile ignore pattern to.gitignoreand removedcompiler.py.bak.CI and Dependency Management:
gaussdb_settings.pyfor local testing.tox-ci.ymlto install dependencies viapip install ..pypyconditions from requirements and simplifiedblack/flake8commands intox.ini.Miscellaneous:
Testing
django_test_suite.shacross specified test apps (admin_changelist,admin_filters,proxy_models,model_fields,constraints,db_functions) and confirmed all tests pass.install_gaussdb_driver.shas a non-root user on HCE, CentOS (Hce2), Euler, and Kylin systems.wagtail_README.mdguide, ensuring successful database migrations and environment setup.JSONArrayandJSONObjectand checking dynamic version detection.tox-ci.ymland verified dependency installation withpip install ..LD_LIBRARY_PATHconfiguration and dynamic link library setup for non-root users, ensuringlibpqis correctly detected.