2017 © Pedro Peláez
 

library yii2-mssql-schema

Optimized Schema for Yii2 applications using mssql databases

image

skiptirengu/yii2-mssql-schema

Optimized Schema for Yii2 applications using mssql databases

  • Friday, June 2, 2017
  • by skiptirengu
  • Repository
  • 1 Watchers
  • 1 Stars
  • 66 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 22 % Grown

The README.md

Schema class for Yii2 applications using SQL Server

Build Status, (*1)

This extension provides an optimized Schema class for Yii2 applications using SQL Server databases, and also fixes several bugs of the current core mssql implementation., (*2)

It achieves a better performance by using the stored procedure sp_help instead of querying the system catalog for each table you're acessing. This cuts down the number of queries Yii executes to get information about your table from three to only one!, (*3)

Requirements

  • PHP >= 5.6
  • SQL Server >= 2008
  • PDO driver (pdo_dblib, pdo_sqlsrv, etc)

Installation

The preferred way to install this extension is through composer., (*4)

Either run, (*5)

composer require "skiptirengu/yii2-mssql-schema:*"

or add, (*6)

"skiptirengu/yii2-mssql-schema": "*"

to the require section of your composer.json file., (*7)

Usage

To use this extension, just change the database configuration of your application to match the following, (*8)

// ...
'components' => [
    'db' => [
        'class' => 'yii\db\Connection',
        // ...
        'schemaMap' => [
            // if you're using freetds + dblib
            'dblib' => 'skiptirengu\mssql\Schema',
            // older MSSQL driver on MS Windows hosts
            'mssql' => 'skiptirengu\mssql\Schema',
            // new ms driver for SQL Server
            // https://github.com/Microsoft/msphpsql
            'sqlsrv' => 'skiptirengu\mssql\Schema',
        ]
    ]
]

and you're set!, (*9)

TODO

  • Backport this to PHP 5.4?
  • Figure out a way to load table comments

License

Licensed under the incredibly permissive MIT license, (*10)

The Versions

02/06 2017

dev-master

9999999-dev

Optimized Schema for Yii2 applications using mssql databases

  Sources   Download

MIT

The Requires

 

The Development Requires

by Skiptir Engu

02/06 2017

0.5.1

0.5.1.0

Optimized Schema for Yii2 applications using mssql databases

  Sources   Download

MIT

The Requires

 

The Development Requires

by Skiptir Engu

16/05 2017

0.5

0.5.0.0

Optimized Schema for Yii2 applications using mssql databases

  Sources   Download

MIT

The Requires

 

The Development Requires

by Skiptir Engu