ajout uuid
This commit is contained in:
parent
5ecc9ac3d7
commit
2f17d85121
@ -44,6 +44,7 @@ abstract class CapacitorStorage {
|
|||||||
const GENLIC_DEFINITION = "varchar(80)";
|
const GENLIC_DEFINITION = "varchar(80)";
|
||||||
const GENLIB_DEFINITION = "varchar(255)";
|
const GENLIB_DEFINITION = "varchar(255)";
|
||||||
const GENTEXT_DEFINITION = "mediumtext";
|
const GENTEXT_DEFINITION = "mediumtext";
|
||||||
|
const GENUUID_DEFINITION = "varchar(36)";
|
||||||
|
|
||||||
protected static function gencol($def): string {
|
protected static function gencol($def): string {
|
||||||
if (!is_string($def)) $def = strval($def);
|
if (!is_string($def)) $def = strval($def);
|
||||||
@ -55,6 +56,7 @@ abstract class CapacitorStorage {
|
|||||||
case "genlic": $def = static::GENLIC_DEFINITION; break;
|
case "genlic": $def = static::GENLIC_DEFINITION; break;
|
||||||
case "genlib": $def = static::GENLIB_DEFINITION; break;
|
case "genlib": $def = static::GENLIB_DEFINITION; break;
|
||||||
case "gentext": $def = static::GENTEXT_DEFINITION; break;
|
case "gentext": $def = static::GENTEXT_DEFINITION; break;
|
||||||
|
case "genuuid": $def = static::GENUUID_DEFINITION; break;
|
||||||
}
|
}
|
||||||
return $def;
|
return $def;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ class PgsqlStorage extends CapacitorStorage {
|
|||||||
const SERTS_DEFINITION = "timestamp";
|
const SERTS_DEFINITION = "timestamp";
|
||||||
const GENSERIAL_DEFINITION = "serial primary key";
|
const GENSERIAL_DEFINITION = "serial primary key";
|
||||||
const GENTEXT_DEFINITION = "text";
|
const GENTEXT_DEFINITION = "text";
|
||||||
|
const GENUUID_DEFINITION = "uuid";
|
||||||
|
|
||||||
function __construct($pgsql) {
|
function __construct($pgsql) {
|
||||||
$this->db = Pgsql::with($pgsql);
|
$this->db = Pgsql::with($pgsql);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user