PHP Classes

File: migrations-db.php

Recommend this page to a friend!
  Classes of Michael Cummings  >  PHP Doctrine Person Table Skeleton  >  migrations-db.php  >  Download  
File: migrations-db.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Doctrine Person Table Skeleton
Provides a skeleton of tables for person entities
Author: By
Last change:
Date: 2 months ago
Size: 836 bytes
 

 

Contents

Class file image Download
<?php
declare(strict_types=1);
$platform = $platform ?? 'mysql';
switch (
$platform) {
    case
'mysql':
        return [
           
'charset' => 'utf8mb4',
           
'collate' => 'utf8mb4_general_ci',
           
'dbname' => 'person_db_skeleton',
           
'driver' => 'pdo_mysql',
           
'host' => 'localhost',
           
'password' => 'secret',
           
'user' => 'PDBSUser',
        ];
    case
'pgsql':
    case
'postgres':
        return [
           
'dbname' => 'person_db_skeleton',
           
'driver' => 'pdo_pgsql',
           
'host' => 'localhost',
           
'password' => 'secret',
           
'user' => 'postgres',
        ];
    case
'sqlite':
        return [
           
'driver' => 'pdo_sqlite',
           
'path' => __DIR__ . '/person_db_skeleton.sq3',
        ];
    default:
        return [];
}


For more information send a message to info at phpclasses dot org.