forked from victorstanciu/dbv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
define.php
56 lines (44 loc) · 1.66 KB
/
define.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* Your database authentication information goes here
* @see http://dbv.vizuina.com/documentation/
*/
define('DBDIFF_DEV', $project->dev);
define('DBDIFF_PROD', $project->prod);
define('DB_HOST', $project->host);
define('DB_PORT', $project->port);
define('DB_USERNAME', $project->user);
define('DB_PASSWORD', $project->pass);
define('DB_DEV_NAME', $project->dev);
define('DB_NAME', $project->prod);
/**
* @see http://dbv.vizuina.com/documentation/#writing-adapters
*/
define('DB_ADAPTER', 'MySQL');
define('DS', DIRECTORY_SEPARATOR);
define('DBV_ROOT_PATH', dirname(__FILE__));
/**
* Only edit this lines if you want to place your schema files in custom locations
* @see http://dbv.vizuina.com/documentation/#optional-settings
*/
define('DBV_DATA_PATH', DBV_ROOT_PATH . DS . 'data'. DS . $project->name);
define('DBV_SCHEMA_PATH', DBV_DATA_PATH . DS . 'schema');
define('DBV_REVISIONS_PATH', DBV_DATA_PATH . DS . 'revisions');
define('DBV_META_PATH', DBV_DATA_PATH . DS . 'meta');
if(!file_exists(DBV_SCHEMA_PATH)) mkdir(DBV_SCHEMA_PATH, 0755, true);
if(!file_exists(DBV_REVISIONS_PATH)) mkdir(DBV_REVISIONS_PATH, 0755, true);
if(!file_exists(DBV_META_PATH)) mkdir(DBV_META_PATH, 0755, true);
ini_set('magic_quotes_gpc', 'Off');
error_reporting(E_ALL ^ E_NOTICE);
/**
* I18n support
*/
define('DBV_LANGUAGES_PATH', DBV_ROOT_PATH . DS . 'languages');
define('DEFAULT_LOCALE', 'en_US');
define('DEFAULT_ENCODING', 'UTF-8');
define('DEFAULT_DOMAIN', 'default');
putenv("LC_ALL=".DEFAULT_LOCALE);
setlocale(LC_ALL, DEFAULT_LOCALE);
bindtextdomain(DEFAULT_DOMAIN, DBV_LANGUAGES_PATH);
bind_textdomain_codeset(DEFAULT_DOMAIN, DEFAULT_ENCODING);
textdomain(DEFAULT_DOMAIN);