Skip to content
Cycle ORM support for Yii
PHP
Branch: master
Clone or download
Latest commit 2573744 Nov 20, 2019

README.md

Yii Cycle ORM support


WIP

Latest Stable Version Total Downloads Build Status Scrutinizer Code Quality Code Coverage

Configuration

Specify config file in params section for composer-config-plugin
How to configure DBAL connections

<?php
return [
    // cycle DBAL config
    'cycle.dbal' => [
        'default' => 'default',
        'aliases' => [],
        'databases' => [
            'default' => ['connection' => 'sqlite']
        ],
        'connections' => [
            'sqlite' => [
                'driver' => \Spiral\Database\Driver\SQLite\SQLiteDriver::class,
                'connection' => 'sqlite:@runtime/database.db',
                'username' => '',
                'password' => '',
            ]
        ],
    ],
    
    // cycle common config
    'cycle.common' => [
        'entityPaths' => [
            '@src/Entity'
        ],
    ],
    
    // cycle migration config
    'cycle.migrations' => [
        'directory' => '@root/migrations',
        'namespace' => 'App\\Migration',
        'table' => 'migration',
        'safe' => false,
    ],
];

Commands

migrate/list
migrate/create
migrate/generate
migrate/up
migrate/down
You can’t perform that action at this time.