Browse Source

Clean up obsolete FIXMEs

reader
J. King 2 years ago
parent
commit
e65069885b
  1. 2
      lib/Db/MySQL/Statement.php
  2. 2
      lib/Db/PDOStatement.php
  3. 2
      lib/Db/PostgreSQL/Statement.php
  4. 2
      lib/Db/SQLite3/Statement.php
  5. 2
      sql/SQLite3/0.sql
  6. 2
      sql/SQLite3/2.sql

2
lib/Db/MySQL/Statement.php

@ -15,7 +15,7 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement {
self::T_DATETIME => "s",
self::T_BINARY => "b",
self::T_STRING => "s",
self::T_BOOLEAN => "i",
self::T_BOOLEAN => "i", // NOTE: Integers are used rather than booleans so that they may be manipulated arithmetically
];
protected $db;

2
lib/Db/PDOStatement.php

@ -15,7 +15,7 @@ abstract class PDOStatement extends AbstractStatement {
self::T_DATETIME => \PDO::PARAM_STR,
self::T_BINARY => \PDO::PARAM_LOB,
self::T_STRING => \PDO::PARAM_STR,
self::T_BOOLEAN => \PDO::PARAM_INT, // FIXME: using \PDO::PARAM_BOOL leads to incompatibilities with versions of SQLite bundled prior to PHP 7.3
self::T_BOOLEAN => \PDO::PARAM_INT, // NOTE: Integers are used rather than booleans so that they may be manipulated arithmetically
];
protected $st;

2
lib/Db/PostgreSQL/Statement.php

@ -15,7 +15,7 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement {
self::T_DATETIME => "timestamp(0) without time zone",
self::T_BINARY => "bytea",
self::T_STRING => "text",
self::T_BOOLEAN => "smallint", // FIXME: using boolean leads to incompatibilities with versions of SQLite bundled prior to PHP 7.3
self::T_BOOLEAN => "smallint", // NOTE: Integers are used rather than booleans so that they may be manipulated arithmetically
];
protected $db;

2
lib/Db/SQLite3/Statement.php

@ -18,7 +18,7 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement {
self::T_DATETIME => \SQLITE3_TEXT,
self::T_BINARY => \SQLITE3_BLOB,
self::T_STRING => \SQLITE3_TEXT,
self::T_BOOLEAN => \SQLITE3_INTEGER,
self::T_BOOLEAN => \SQLITE3_INTEGER, // NOTE: Integers are used rather than booleans so that they may be manipulated arithmetically
];
protected $db;

2
sql/SQLite3/0.sql

@ -16,7 +16,7 @@ create table arsse_users(
avatar_type text, -- internal avatar image's MIME content type
avatar_data blob, -- internal avatar image's binary data
admin boolean default 0, -- whether the user is a member of the special "admin" group
rights integer not null default 0 -- temporary admin-rights marker FIXME: remove reliance on this
rights integer not null default 0 -- temporary admin-rights marker
);
create table arsse_users_meta(

2
sql/SQLite3/2.sql

@ -13,7 +13,7 @@ create table arsse_users_new(
avatar_type text, -- internal avatar image's MIME content type
avatar_data blob, -- internal avatar image's binary data
admin boolean default 0, -- whether the user is a member of the special "admin" group
rights integer not null default 0 -- temporary admin-rights marker FIXME: remove reliance on this
rights integer not null default 0 -- temporary admin-rights marker
);
insert into arsse_users_new(id,password,name,avatar_type,avatar_data,admin,rights) select id,password,name,avatar_type,avatar_data,admin,rights from arsse_users;
drop table arsse_users;

Loading…
Cancel
Save