On Thursday, June 22, 2017 at 8:05:30 AM UTC-7, Sushant Bajracharya wrote:
>
> I have tried Text :about and it worked while creating the table but when
> altering the table it gave me an err ( NoMethodError: undefined method
> `Text' for #<Sequel::Postgres::AlterTableGenerator:0x00000002a46cd8> ). I
> also tried String :about, text: true and it throwed err ( ArgumentError:
> wrong number of arguments (given 2, expected 1) ).
>
You are apparently trying to use methods only valid in a create_table block
inside an alter_table block. Instead, you need to call add_column:
alter_table(:table_name) do
add_column :about, :text
end
See the alter_table documentation in the schema modification
guide:
http://sequel.jeremyevans.net/rdoc/files/doc/schema_modification_rdoc.html#label-alter_table
Thanks,
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.