I think that's the same -- you just have to set that up in the .def file. Unfortunately, I think any time you regenerate the .def file you'll have to do that.
For whatever reason, Links doesn't automatically recognize the select fields (though it could by looking for a '|' in the default value)...
Code:
%db_select_fields = (
ReceiveMail => 'Yes,No',
isChanged => 'Yes,No',
isNew => 'Yes,No',
isPopular => 'Yes,No'
I've asked about, and have on my to-do-list if alex doesn't get around to it, a way to change the defaults in the routine that sets them up. I think it's in DBSQL.pm, a block of code that writes out the .def file, but inserts defaults. What that could/should do is go back and check the SQL.mysql or similar file, for the local-defaults and overrides, so that when the .def file is rebuilt, you don't have to make all the changes again. (I'm a fan of keeping things together, so putting all the local 'setup information' in one place, like SQL.mysql is attractive to me... that makes a set-up file with system defaults, and a config file - Links.pm -- for operational settings).
This would work, since the only thing that is _really_ resync'd is the database fields-- it's information that is already in the table, that written to a file so that Links can make some extra assumptions about it, and work a bit faster (such as field numbers).
If when Links is re-writing the file it looks to see if there are overrides for local defaults such as "weight" "not_null" (the two big overrides) and the pattern match, if the table had a field with the same name, the local overrides were used.
When a table is edited in the admin area, the local overrides are updated.
This shouldn't be too hard, since a quick hack would be to make it a function call to set the defaults over what Links just set them to, and in the admin area a function call to write the defaults out. A more elegant solution would be to take each of the links tests, and "if" them so that if a local value exists use it, otherwise use the default..... But the more changes to Links, the more you'll have to do in an update, so the override function call is probably the best short-term solution.
[This message has been edited by pugdog (edited December 04, 1999).]