postgres, schema generator changes text columns to varchar

11 views
Skip to first unread message

Kostas kougios

unread,
Apr 21, 2017, 10:13:40 AM4/21/17
to Slick / ScalaQuery
Hi,

As per the title. I create a database via a sql script with text columns. I genSchema using the code generator. But when I re-create the database using slick, the columns are now varchar.

It seems text / varchar are similar if not equivalent in postgres but I can't be sure of sideeffects. Why does slick do that conversion? Is it a bug? How can I avoid it?

Thanks,

Kostas

Trevor Sibanda

unread,
Apr 22, 2017, 1:32:33 AM4/22/17
to Slick / ScalaQuery
Hi can tou please post the sql script you used with the code generator.

Thanks :)

Kostas kougios

unread,
Apr 24, 2017, 4:36:20 AM4/24/17
to scalaquery googlegroups.com, Slick / ScalaQuery
I can't post all of it but I do have a test table:

create table test(id int primary key, value text not null);

After slick re-creates it in a blank db, it becomes:

CREATE TABLE test
(
 id integer NOT NULL,
 value character varying NOT NULL,
 CONSTRAINT test_pkey PRIMARY KEY (id)
)


Regards,

Kostas Kougios


On Apr 22 2017, at 6:32 am, Trevor Sibanda <siband...@gmail.com> wrote:
Hi can tou please post the sql script you  used with the code generator.

Thanks :)

-- 

--- 
You received this message because you are subscribed to a topic in the Google Groups "Slick / ScalaQuery" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scalaquery/KPCu4kahfnQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scalaquery+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/63f7f43b-cadb-429e-ad09-a7029461107f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages