Skip to content

Latest commit

 

History

History
65 lines (54 loc) · 2.59 KB

README.md

File metadata and controls

65 lines (54 loc) · 2.59 KB




Latest Stable Version Total Downloads License

CockroachDB Driver

Driver for supports CockroachDB in Doctrine DBAL. This library fixes errors related doctrine:migrations when using PostgreSQL driver.

Serverless connection URL format: //clouduser:cloudpass@free-tier7.aws-eu-west-1.cockroachlabs.cloud:26257/clustername.dbname

Symfony configuration example:

# doctrine.yaml
doctrine:
    dbal:
        user: root
        port: 26257
        host: localhost
        dbname: database_name
        platform_service: LapayGroup\DoctrineCockroach\Platforms\CockroachPlatform
        driver_class: LapayGroup\DoctrineCockroach\Driver\CockroachDriver
        
    # Serverless example
    dbal:
        user: wildtuna
        password: password
        port: 26257
        host: free-tier7.aws-eu-west-1.cockroachlabs.cloud
        dbname: lapaygroup-test-869.defaultdb
        platform_service: LapayGroup\DoctrineCockroach\Platforms\CockroachPlatform
        driver_class: LapayGroup\DoctrineCockroach\Driver\CockroachDriver

Connection url style:

# doctrine.yaml
doctrine:
    dbal:
        url: //root:@localhost:26257/database_name
        platform_service: LapayGroup\DoctrineCockroach\Platforms\CockroachPlatform
        driver_class: LapayGroup\DoctrineCockroach\Driver\CockroachDriver
        
    # Serverless example    
    dbal:
        url: '//wildtuna:password@free-tier7.aws-eu-west-1.cockroachlabs.cloud:26257/lapaygroup-test-869.defaultdb'
        platform_service: LapayGroup\DoctrineCockroach\Platforms\CockroachPlatform
        driver_class: LapayGroup\DoctrineCockroach\Driver\CockroachDriver     
# services.yaml
services:
  LapayGroup\DoctrineCockroach\Platforms\CockroachPlatform:
    autowire: true

  LapayGroup\DoctrineCockroach\Driver\CockroachDriver:
    autowire: true

  LapayGroup\DoctrineCockroach\Schema\CockroachSchemaManager:
    autowire: true