freshrss-app/setup_db.php

15 lines
428 B
PHP
Raw Normal View History

2017-02-17 08:45:48 +00:00
<?PHP
include_once('/app/code/app/SQL/install.sql.mysql.php');
$c = new PDO("mysql:dbname=".getenv('MYSQL_DATABASE').";host=".getenv('MYSQL_HOST').";port=".getenv('MYSQL_PORT'), getenv('MYSQL_USERNAME'), getenv('MYSQL_PASSWORD'));
$sql = sprintf(SQL_CREATE_TABLES, 'admin_', 'Uncategorized');
$stm = $c->prepare($sql);
$stm->execute();
$sql = sprintf(SQL_INSERT_FEEDS, 'admin_');
$stm = $c->prepare($sql);
$stm->execute();