#119 Add column default value to properties dialog

open
nobody
None
5
2014-08-24
2008-08-08
Anonymous
No

using version 0.8.6 with firebird 2.1

When I use the "Add field" link in table properties
the generated command is
ALTER TABLE INSCRIPTION_GUIDE ADD
test1 Integer NOT NULL;
COMMIT;
UPDATE INSCRIPTION_GUIDE
SET test1 = '0'
WHERE test1 IS NULL;
commit;

although I answered 0 when asked for a default value.

To define a default value for the new field, I have to manually enter the following command (just added the " Default 0 " part):
ALTER TABLE INSCRIPTION_GUIDE ADD
test1 Integer DEFAULT 0 NOT NULL;
COMMIT;
UPDATE INSCRIPTION_GUIDE
SET test1 = '0'
WHERE test1 IS NULL;
commit;

Is the feature missing in 0.8.6 or defective? Or I don't understand how to ask Flamerobin for it?

Discussion

  • agromsl

    agromsl - 2008-08-08

    Logged In: YES
    user_id=2081931
    Originator: NO

    Also tested with other default values than 0 and it doesn't work either.

     
  • Milan Babuskov

    Milan Babuskov - 2008-09-13

    It is not a default value for the column definition, it's a default value for existing rows which have NULL and would be invalid otherwise (since FB does not check).

    Maybe once we add a DEFAULT box to field properties dialog, everything will be clear.

     
  • pabloj

    pabloj - 2008-11-04

    I second this one, please add an option to set default value for column.
    This is still a problem with 0.9.0.1748 UNICODE.
    Thanks in advance and keep up the good work.

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks