#690 invalid
BrianTheCoder

:length property option has no effect

Reported by BrianTheCoder | December 2nd, 2008 @ 08:57 PM

I specificed the :length option on a string property, but it keeps generating the field with a length of 50. This is with the postgres adapter.

All do and dm related gems are version 0.9.7

Comments and changes to this ticket

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) December 2nd, 2008 @ 11:34 PM

    • Tag set to bug, do_postgres
    • State changed from “new” to “open”

    Brian, can you run the following program and paste in what the output is?

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) December 2nd, 2008 @ 11:36 PM

    Here's a slight update to ensure a 300 character String can be persisted.

  • BrianTheCoder

    BrianTheCoder December 2nd, 2008 @ 11:36 PM

    Wed, 03 Dec 2008 05:36:42 GMT ~ debug ~ SELECT COUNT() FROM "information_schema"."columns" WHERE "table_name" = 'tests' AND "table_schema" = current_schema() Wed, 03 Dec 2008 05:36:43 GMT ~ debug ~ SELECT COUNT() FROM "pg_class" WHERE "relkind" = 'S' AND "relname" = 'tests_id_seq' Wed, 03 Dec 2008 05:36:43 GMT ~ debug ~ CREATE SEQUENCE "tests_id_seq" Wed, 03 Dec 2008 05:36:43 GMT ~ debug ~ SET client_min_messages = warning Wed, 03 Dec 2008 05:36:43 GMT ~ debug ~ SELECT COUNT(*) FROM "information_schema"."columns" WHERE "table_name" = 'tests' AND "table_schema" = current_schema() Wed, 03 Dec 2008 05:36:43 GMT ~ debug ~ CREATE TABLE "tests" ("id" INT4 NOT NULL DEFAULT nextval('tests_id_seq') NOT NULL, "name" VARCHAR(300), PRIMARY KEY("id")) Wed, 03 Dec 2008 05:36:43 GMT ~ debug ~ RESET client_min_messages

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) December 2nd, 2008 @ 11:52 PM

    • State changed from “open” to “invalid”

    Followed up with Brian via IRC.

    He was using auto_upgrade and wondering why it wouldn't extend the length of a column automatically. While it could be argued that increasing the allowed set of values in a field could be handled by auto_upgrade relatively safely, it currently only operates under the assumption that it will add stuff that didn't previously exist.

    This will likely be the case for the near future unless someone wants to take on the task of creating the rules for figuring out what modifications are safe, and performing those changes on the DB structure.

    I am marking this ticket as invalid.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Attachments

Pages