My setup: Rails 2.3.10, Ruby 1.8.7
I would like to add a database table column with the name "default", is that allowed or is it a reserved word in Ruby, Rails, sqlite, postgresql...?
In Object Explorer, right-click the table with columns for which you want to change the scale and select Design. Select the column for which you want to specify a default value.
Certain columns and data types have predefined or assigned default values. For example, default column values for the various data types are as follows: NULL. 0 Used for small integer, integer, decimal, single-precision floating point, double-precision floating point, and decimal floating point data type.
In SQL Server, the default constraint names start with specific prefixes: PK , UQ , CK , or FK . The default name for a PRIMARY KEY constraint starts with ' PK ', followed by underscores (' __ '), the table name, more underscores (' __ '), and a hexadecimal sequence number generated by SQL Server.
Here is the list of reserved words that don't play friendly as table columns in Rails http://oldwiki.rubyonrails.org/rails/pages/ReservedWords
If you're using mysql, DEFAULT is a reserved word according to: http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With