Skip to content

Commit

Permalink
Add support for Postgresql in create universe, db, and schema.
Browse files Browse the repository at this point in the history
Add table, sequence, and alter-sequence definitions for all tables.
  • Loading branch information
The Kabal committed Sep 21, 2014
1 parent 6f69dec commit 393edf9
Show file tree
Hide file tree
Showing 73 changed files with 393 additions and 15 deletions.
50 changes: 44 additions & 6 deletions classes/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,14 @@ public function initDb($db_layer)
// Attempt to connect to the database
try
{
$db = ADONewConnection('mysqli');
if ($db_type === 'postgres9')
{
$db = ADONewConnection('postgres9');
}
else
{
$db = ADONewConnection('mysqli');
}

// The data field name "data" violates SQL reserved words - switch it to SESSDATA

Expand All @@ -100,12 +107,21 @@ public function initDb($db_layer)
catch (\Exception $e)
{
// We need to display the error message onto the screen.
$err_msg = 'Blacknova Traders Error: Unable to connect to the ' . $db_type .
$err_msg = 'The Kabal Invasion - General error: Unable to connect to the ' . $db_type .
' Database.<br> Database Error: '. $db->ErrorNo() .
': '. $db->ErrorMsg() .'<br>\n';
die ($err_msg);
}

if ($db_type === 'postgres9')
{
$db->type = 'pgsql';
}
else
{
$db->type = 'mysql';
}

$db->prefix = $db_prefix;
// End of database work
return $db;
Expand All @@ -115,12 +131,24 @@ public function initDb($db_layer)
// Connect to database with pdo
try
{
// Include the charset when connecting
$pdo_db = new PDO("mysql:host=$db_host; port=$db_port; dbname=$db_name; charset=utf8mb4", $db_user, $db_pwd);
if ($db_type === 'postgres9')
{
if ($db_port === null)
{
$db_port = '5432';
}

$pdo_db = new PDO("pgsql:host=$db_host; port=$db_port; dbname=$db_name;", $db_user, $db_pwd);
}
else
{
// Include the charset when connecting
$pdo_db = new PDO("mysql:host=$db_host; port=$db_port; dbname=$db_name; charset=utf8mb4", $db_user, $db_pwd);
}
}
catch (\PDOException $e)
{
$err_msg = 'Blacknova Traders Error: Unable to connect to the ' . $db_type .
$err_msg = 'The Kabal Invasion - General error: Unable to connect to the ' . $db_type .
' Database.<br> Database Error: '.
$e->getMessage() ."<br>\n";
die ($err_msg);
Expand All @@ -129,6 +157,16 @@ public function initDb($db_layer)
// Disable emulated prepares so that we get true prepared statements
// These are slightly slower, but also far safer in a number of cases that matter
$pdo_db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);

if ($db_type === 'postgres9')
{
$pdo_db->type = 'pgsql';
}
else
{
$pdo_db->type = 'mysql';
}

$pdo_db->prefix = $db_prefix;
return $pdo_db;
}
Expand Down Expand Up @@ -189,4 +227,4 @@ public static function logDbErrors($db, $query, $served_line, $served_page)
}
}
}
?>

13 changes: 6 additions & 7 deletions classes/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@

class Schema
{
public static function destroy($db, $db_prefix)
public static function destroy($db, $db_prefix, $dbtype)
{
// Need to set this or all hell breaks loose.
$db->inactive = true;

$i = 0;
$schema_files = new \DirectoryIterator('schema/mysql'); // TODO: This is hardcoded for mysql right now, but needs to be extended to handle pgsql also
$schema_files = new \DirectoryIterator('schema/' . $dbtype);
$destroy_table_results = array();

foreach ($schema_files as $schema_filename)
{
$table_timer = new Timer;
$table_timer->start(); // Start benchmarking

if ($schema_filename->isFile() && $schema_filename->getExtension() == 'sql')
if ($schema_filename->isFile() && $schema_filename->getExtension() == 'sql' && !strpos($schema_filename, '-seq'))
{
// Routine to handle persistent database tables. If a SQL schema file starts with persist-, then it is a persistent table. Fix the name.
$persist_file = (mb_substr($schema_filename, 0, 8) === 'persist-');
Expand Down Expand Up @@ -78,11 +78,11 @@ public static function destroy($db, $db_prefix)
return $destroy_table_results;
}

public static function create($db, $db_prefix)
public static function create($db, $db_prefix, $dbtype)
{
$i = 0;
define('PDO_SUCCESS', (string) '00000'); // PDO gives an error code of string 00000 if successful. Not extremely helpful.
$schema_files = new \DirectoryIterator('schema/mysql/'); // TODO: This is hardcoded for mysql right now, but needs to be extended to handle pgsql also
$schema_files = new \DirectoryIterator('schema/' . $dbtype);

// New SQL Schema table creation
$create_table_results = array();
Expand All @@ -106,7 +106,7 @@ public static function create($db, $db_prefix)
}

// Slurp the SQL call from schema, and turn it into an SQL string
$sql_query = file_get_contents('schema/mysql/' . $schema_filename);
$sql_query = file_get_contents('schema/' . $dbtype . '/' . $schema_filename);

// Replace the default prefix (bnt_) with the chosen table prefix from the game.
$sql_query = preg_replace('/bnt_/', $db_prefix, $sql_query);
Expand Down Expand Up @@ -138,4 +138,3 @@ public static function create($db, $db_prefix)
return $create_table_results;
}
}
?>
2 changes: 1 addition & 1 deletion create_universe/30.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
$variables['fedsecs'] = filter_input(INPUT_POST, 'fedsecs', FILTER_SANITIZE_NUMBER_INT);
$variables['loops'] = filter_input(INPUT_POST, 'loops', FILTER_SANITIZE_NUMBER_INT);
$variables['swordfish'] = filter_input(INPUT_POST, 'swordfish', FILTER_SANITIZE_URL);
$variables['destroy_schema_results'] = Bnt\Schema::destroy($pdo_db, $pdo_db->prefix); // Delete all tables in the database
$variables['destroy_schema_results'] = Bnt\Schema::destroy($pdo_db, $pdo_db->prefix, $pdo_db->type); // Delete all tables in the database
$variables['table_count'] = count($variables['destroy_schema_results']) - 1;
$variables['autorun'] = filter_input(INPUT_POST, 'autorun', FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
$variables['newlang'] = filter_input(INPUT_POST, 'newlang', FILTER_SANITIZE_URL);
Expand Down
2 changes: 1 addition & 1 deletion create_universe/40.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
$variables['fedsecs'] = filter_input(INPUT_POST, 'fedsecs', FILTER_SANITIZE_NUMBER_INT);
$variables['loops'] = filter_input(INPUT_POST, 'loops', FILTER_SANITIZE_NUMBER_INT);
$variables['swordfish'] = filter_input(INPUT_POST, 'swordfish', FILTER_SANITIZE_URL);
$variables['create_schema_results'] = Bnt\Schema::create($pdo_db, $pdo_db->prefix); // Create all tables in the database
$variables['create_schema_results'] = Bnt\Schema::create($pdo_db, $pdo_db->prefix, $pdo_db->type); // Create all tables in the database
$variables['table_count'] = count($variables['create_schema_results']) - 1;
$variables['autorun'] = filter_input(INPUT_POST, 'autorun', FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
$variables['newlang'] = filter_input(INPUT_POST, 'newlang', FILTER_SANITIZE_URL);
Expand Down
5 changes: 5 additions & 0 deletions docs/changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
TheKabal (21 September 2014)
--------------------------------------
Add support for Postgresql in create universe, db, and schema.
Add table, sequence, and alter-sequence definitions for all tables.

TheKabal (31 August 2014)
--------------------------------------
Create a News & Scheduler Domain Entity, and split out a Gateway for each to hold SQL calls related to them.
Expand Down
8 changes: 8 additions & 0 deletions schema/pgsql/adodb_logsql.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CREATE TABLE IF NOT EXISTS bnt_adodb_logsql (
created timestamp without time zone NOT NULL,
sql0 character varying(250) NOT NULL,
sql1 text,
params text,
tracer text,
timer numeric(16,0) NOT NULL
)
1 change: 1 addition & 0 deletions schema/pgsql/bans-seq-alter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER SEQUENCE bnt_bans_ban_id_seq OWNED BY bnt_bans.ban_id;
1 change: 1 addition & 0 deletions schema/pgsql/bans-seq.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE bnt_bans_ban_id_seq;
10 changes: 10 additions & 0 deletions schema/pgsql/bans.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CREATE TABLE IF NOT EXISTS bnt_bans (
ban_id integer NOT NULL DEFAULT nextval('bnt_bans_ban_id_seq'),
ban_type integer NOT NULL DEFAULT '0',
ban_mask character varying(16) DEFAULT NULL,
ban_ship integer DEFAULT NULL,
ban_date timestamp without time zone DEFAULT NULL,
public_info text,
admin_info text,
PRIMARY KEY (ban_id)
);
1 change: 1 addition & 0 deletions schema/pgsql/bounty-seq-alter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER SEQUENCE bnt_bounty_bounty_id_seq OWNED BY bnt_bounty.bounty_id;
1 change: 1 addition & 0 deletions schema/pgsql/bounty-seq.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE bnt_bounty_bounty_id_seq;
7 changes: 7 additions & 0 deletions schema/pgsql/bounty.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CREATE TABLE IF NOT EXISTS bnt_bounty (
bounty_id integer NOT NULL DEFAULT nextval('bnt_bounty_bounty_id_seq'),
amount integer NOT NULL DEFAULT '0',
bounty_on integer NOT NULL DEFAULT '0',
placed_by integer NOT NULL DEFAULT '0',
PRIMARY KEY (bounty_id)
);
1 change: 1 addition & 0 deletions schema/pgsql/characters-seq-alter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER SEQUENCE bnt_characters_character_id_seq OWNED BY bnt_characters.character_id;
1 change: 1 addition & 0 deletions schema/pgsql/characters-seq.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE bnt_characters_character_id_seq;
10 changes: 10 additions & 0 deletions schema/pgsql/characters.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CREATE TABLE IF NOT EXISTS bnt_characters (
character_id integer NOT NULL DEFAULT nextval('bnt_characters_character_id_seq'),
character_name character varying(20) NOT NULL,
credits integer NOT NULL DEFAULT '0',
turns integer NOT NULL DEFAULT '0',
turns_used integer NOT NULL DEFAULT '0',
rating integer NOT NULL DEFAULT '0',
score integer NOT NULL DEFAULT '0',
PRIMARY KEY (character_id)
);
1 change: 1 addition & 0 deletions schema/pgsql/gameconfig-seq-alter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER SEQUENCE bnt_gameconfig_config_id_seq OWNED BY bnt_gameconfig.config_id;
1 change: 1 addition & 0 deletions schema/pgsql/gameconfig-seq.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE bnt_gameconfig_config_id_seq;
9 changes: 9 additions & 0 deletions schema/pgsql/gameconfig.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CREATE TABLE IF NOT EXISTS bnt_gameconfig (
config_id integer NOT NULL DEFAULT nextval('bnt_gameconfig_config_id_seq'),
section character varying(30) NOT NULL DEFAULT 'game',
"name" character varying(75) NOT NULL,
category character varying(30) NOT NULL,
type character varying(8) NOT NULL,
"value" character varying(128) NOT NULL,
PRIMARY KEY (config_id)
);
7 changes: 7 additions & 0 deletions schema/pgsql/ibank_accounts.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CREATE TABLE IF NOT EXISTS bnt_ibank_accounts (
ship_id integer NOT NULL DEFAULT '0',
balance integer DEFAULT '0',
loan integer DEFAULT '0',
loantime timestamp without time zone DEFAULT NULL,
PRIMARY KEY (ship_id)
)
1 change: 1 addition & 0 deletions schema/pgsql/ibank_transfers-seq-alter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER SEQUENCE bnt_ibank_transfers_transfer_id_seq OWNED BY bnt_ibank_transfers.transfer_id;
1 change: 1 addition & 0 deletions schema/pgsql/ibank_transfers-seq.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE bnt_ibank_transfers_transfer_id_seq;
8 changes: 8 additions & 0 deletions schema/pgsql/ibank_transfers.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CREATE TABLE IF NOT EXISTS bnt_ibank_transfers (
transfer_id integer NOT NULL DEFAULT nextval('bnt_ibank_transfers_transfer_id_seq'),
source_id integer NOT NULL DEFAULT '0',
dest_id integer NOT NULL DEFAULT '0',
"time" timestamp without time zone DEFAULT NULL,
amount integer NOT NULL DEFAULT '0',
PRIMARY KEY (transfer_id)
);
1 change: 1 addition & 0 deletions schema/pgsql/ip_bans-seq-alter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER SEQUENCE bnt_ip_bans_ban_id_seq OWNED BY bnt_ip_bans.ban_id;
1 change: 1 addition & 0 deletions schema/pgsql/ip_bans-seq.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE bnt_ip_bans_ban_id_seq;
5 changes: 5 additions & 0 deletions schema/pgsql/ip_bans.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CREATE TABLE IF NOT EXISTS bnt_ip_bans (
ban_id integer NOT NULL DEFAULT nextval('bnt_ip_bans_ban_id_seq'),
ban_mask character varying(16) NOT NULL,
PRIMARY KEY (ban_id)
);
1 change: 1 addition & 0 deletions schema/pgsql/languages-seq-alter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER SEQUENCE bnt_languages_lang_id_seq OWNED BY bnt_languages.lang_id;
1 change: 1 addition & 0 deletions schema/pgsql/languages-seq.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE bnt_languages_lang_id_seq;
9 changes: 9 additions & 0 deletions schema/pgsql/languages.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CREATE TABLE IF NOT EXISTS bnt_languages (
lang_id integer NOT NULL DEFAULT nextval('bnt_languages_lang_id_seq'),
section character varying(30) NOT NULL DEFAULT 'english',
"name" character varying(75) NOT NULL,
category character varying(30) NOT NULL,
type character varying(8) NOT NULL,
"value" character varying(2000) NOT NULL,
PRIMARY KEY (lang_id)
);
1 change: 1 addition & 0 deletions schema/pgsql/links-seq-alter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER SEQUENCE bnt_links_link_id_seq OWNED BY bnt_links.link_id;
1 change: 1 addition & 0 deletions schema/pgsql/links-seq.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE bnt_links_link_id_seq;
6 changes: 6 additions & 0 deletions schema/pgsql/links.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CREATE TABLE IF NOT EXISTS bnt_links (
link_id integer NOT NULL DEFAULT nextval('bnt_links_link_id_seq'),
link_start integer NOT NULL DEFAULT '0',
link_dest integer NOT NULL DEFAULT '0',
PRIMARY KEY (link_id)
);
1 change: 1 addition & 0 deletions schema/pgsql/logs-seq-alter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER SEQUENCE bnt_logs_log_id_seq OWNED BY bnt_logs.log_id;
1 change: 1 addition & 0 deletions schema/pgsql/logs-seq.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE bnt_logs_log_id_seq;
8 changes: 8 additions & 0 deletions schema/pgsql/logs.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CREATE TABLE IF NOT EXISTS bnt_logs (
log_id integer NOT NULL DEFAULT nextval('bnt_logs_log_id_seq'),
ship_id integer NOT NULL DEFAULT '0',
"type" integer NOT NULL DEFAULT '0',
"time" timestamp without time zone DEFAULT NULL,
"data" text,
PRIMARY KEY (log_id)
);
1 change: 1 addition & 0 deletions schema/pgsql/messages-seq-alter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER SEQUENCE bnt_messages_id_seq OWNED BY bnt_messages.id;
1 change: 1 addition & 0 deletions schema/pgsql/messages-seq.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE bnt_messages_id_seq;
10 changes: 10 additions & 0 deletions schema/pgsql/messages.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CREATE TABLE IF NOT EXISTS bnt_messages (
id integer NOT NULL DEFAULT nextval('bnt_messages_id_seq'),
sender_id integer NOT NULL DEFAULT '0',
recp_id integer NOT NULL DEFAULT '0',
"subject" character varying(250) DEFAULT NULL,
sent character varying(19) DEFAULT NULL,
message text,
notified character varying(1) NOT NULL DEFAULT 'N',
PRIMARY KEY (id)
);
1 change: 1 addition & 0 deletions schema/pgsql/movement_log-seq-alter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER SEQUENCE bnt_movement_log_event_id_seq OWNED BY bnt_movement_log.event_id;
1 change: 1 addition & 0 deletions schema/pgsql/movement_log-seq.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE bnt_movement_log_event_id_seq;
7 changes: 7 additions & 0 deletions schema/pgsql/movement_log.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CREATE TABLE IF NOT EXISTS bnt_movement_log (
event_id integer NOT NULL DEFAULT nextval('bnt_movement_log_event_id_seq'),
ship_id integer NOT NULL DEFAULT '0',
sector_id integer DEFAULT '0',
"time" timestamp without time zone DEFAULT NULL,
PRIMARY KEY (event_id)
);
1 change: 1 addition & 0 deletions schema/pgsql/news-seq-alter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER SEQUENCE bnt_news_news_id_seq OWNED BY bnt_news.news_id;
1 change: 1 addition & 0 deletions schema/pgsql/news-seq.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE bnt_news_news_id_seq;
9 changes: 9 additions & 0 deletions schema/pgsql/news.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CREATE TABLE IF NOT EXISTS bnt_news (
news_id integer NOT NULL DEFAULT nextval('bnt_news_news_id_seq'),
headline character varying(100) NOT NULL,
newstext text,
user_id integer DEFAULT NULL,
"date" timestamp without time zone DEFAULT NULL,
news_type character varying(10) DEFAULT NULL,
PRIMARY KEY (news_id)
);
1 change: 1 addition & 0 deletions schema/pgsql/planets-seq-alter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER SEQUENCE bnt_planets_planet_id_seq OWNED BY bnt_planets.planet_id;
1 change: 1 addition & 0 deletions schema/pgsql/planets-seq.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE bnt_planets_planet_id_seq;
25 changes: 25 additions & 0 deletions schema/pgsql/planets.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
CREATE TABLE IF NOT EXISTS bnt_planets (
planet_id integer NOT NULL DEFAULT nextval('bnt_planets_planet_id_seq'),
sector_id integer NOT NULL DEFAULT '0',
"name" character varying(15) DEFAULT NULL,
organics integer NOT NULL DEFAULT '0',
ore integer NOT NULL DEFAULT '0',
goods integer NOT NULL DEFAULT '0',
energy integer NOT NULL DEFAULT '0',
colonists integer NOT NULL DEFAULT '0',
credits integer NOT NULL DEFAULT '0',
fighters integer NOT NULL DEFAULT '0',
torps integer NOT NULL DEFAULT '0',
"owner" integer NOT NULL DEFAULT '0',
corp integer NOT NULL DEFAULT '0',
base character varying(1) NOT NULL DEFAULT 'N',
sells character varying(1) NOT NULL DEFAULT 'N',
prod_organics integer NOT NULL DEFAULT '20',
prod_ore integer NOT NULL DEFAULT '0',
prod_goods integer NOT NULL DEFAULT '0',
prod_energy integer NOT NULL DEFAULT '0',
prod_fighters integer NOT NULL DEFAULT '0',
prod_torp integer NOT NULL DEFAULT '0',
defeated character varying(1) NOT NULL DEFAULT 'N',
PRIMARY KEY (planet_id)
);
1 change: 1 addition & 0 deletions schema/pgsql/players-seq-alter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER SEQUENCE bnt_players_player_id_seq OWNED BY bnt_players.player_id;
1 change: 1 addition & 0 deletions schema/pgsql/players-seq.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE bnt_players_player_id_seq;
10 changes: 10 additions & 0 deletions schema/pgsql/players.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CREATE TABLE IF NOT EXISTS bnt_players (
player_id integer NOT NULL DEFAULT nextval('bnt_players_player_id_seq'),
"password" character varying(255) NOT NULL,
recovery_time integer DEFAULT NULL,
email character varying(60) DEFAULT NULL,
last_login timestamp without time zone DEFAULT NULL,
ip_address character varying(16) NOT NULL,
lang character varying(30) NOT NULL DEFAULT 'english.inc',
PRIMARY KEY (player_id)
);
1 change: 1 addition & 0 deletions schema/pgsql/presets-seq-alter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER SEQUENCE bnt_presets_preset_id OWNED BY bnt_presets.preset_id;
1 change: 1 addition & 0 deletions schema/pgsql/presets-seq.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE bnt_presets_preset_id;
Loading

0 comments on commit 393edf9

Please sign in to comment.