0

I'm using the sequel ruby orm with sql server. I would like to know how to set the default value of a datetime field to the sql server function getdate() in a migration:

create_table(:table) do
  primary_key :id
  datetime :last_update, null: false, default: ???
end

Thanks for your help :-)

Sylvain
  • 15
  • 2

1 Answers1

0

You probably want default: Sequel.function(:getdate), assuming you are a using the current version of Sequel.

Jeremy Evans
  • 11,959
  • 27
  • 26