Join things together to postgres
This commit is contained in:
parent
5282b5cabb
commit
ff33fd7bcf
|
@ -1,3 +1,4 @@
|
||||||
.*.swp
|
.*.swp
|
||||||
*.mock
|
*.mock
|
||||||
config/config.php
|
config/config.php
|
||||||
|
migrations/*.done
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$config = [
|
$config = [
|
||||||
|
"db_host" => "127.0.0.1",
|
||||||
|
"db_port" => 5432,
|
||||||
|
"db_name" => "realfan",
|
||||||
|
"db_user" => "realfan",
|
||||||
|
"db_pass" => "changemeNOW",
|
||||||
"site_name" => "https://your-site.com",
|
"site_name" => "https://your-site.com",
|
||||||
];
|
];
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
CREATE TABLE IF NOT EXISTS users (
|
||||||
|
id serial PRIMARY KEY,
|
||||||
|
acct VARCHAR(64) UNIQUE NOT NULL,
|
||||||
|
access_token VARCHAR(128) NOT NULL,
|
||||||
|
account_data TEXT NULL,
|
||||||
|
account_type VARCHAR(32) NOT NULL,
|
||||||
|
created_on TIMESTAMP NOT NULL
|
||||||
|
);
|
|
@ -1,3 +1,4 @@
|
||||||
|
<?php require_once '/src/classes/database.php' ?>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
# TODO: uncomment when done
|
# TODO: uncomment when done
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
class Database {
|
||||||
|
|
||||||
|
private $db;
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
$this->db = new PDO('pgsql:host=db;dbname=realfan', 'realfan', 'changemeNOW');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function close() {
|
||||||
|
$this->db->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue