Skip to content
Snippets Groups Projects
Verified Commit 62e30986 authored by Daniel Kurowski's avatar Daniel Kurowski Committed by Jiří Pudil
Browse files

rename version type to packageVersion

parent 5c2df26f
No related branches found
No related tags found
1 merge request!40CompositeType: add explicit type cast to support composite values in WHERE clause
......@@ -68,7 +68,7 @@ final class PackagesTable implements Table
{
return [
'name' => new ColumnMetadata('name', 'text', false, false),
'version' => new ColumnMetadata('version', 'version', false, false)
'version' => new ColumnMetadata('version', '"packageVersion"', false, false)
];
}
......
......@@ -18,7 +18,7 @@ final class VersionType extends CompositeType
public function __construct()
{
parent::__construct(
new NamedIdentifier('version'),
new NamedIdentifier('public', 'packageVersion'),
new IntType(),
new IntType(),
new IntType(),
......
......@@ -20,9 +20,9 @@ CREATE TABLE IF NOT EXISTS public.test (
SQL);
$connection->nativeQuery(<<<SQL
CREATE TYPE public.version AS (major int, minor int, patch int);
CREATE TYPE public."packageVersion" AS (major int, minor int, patch int);
CREATE TABLE IF NOT EXISTS public.package (
name text NOT NULL PRIMARY KEY,
version public.version NOT NULL
version public."packageVersion" NOT NULL
);
SQL);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment