Related: #910
Related: #797
This would be more of a column helper so when you define a column that you want a default to be a sequence, it sets everything up for you.
create :accounts do
add number : Int64, default: :sequence
end
My thought is that this would automatiically create this column and a sequence as well as set the default value to that sequence.
CREATE SEQUENCE accounts_number_seq;
CREATE TABLE accounts (
number int DEFAULT nextval('accounts_number_seq')
);
Maybe something like that.... One tricky part is I don't think the crystal DB allows you to run multiple statements at once. We may need will/crystal-pg#253 to be implemented before this can be done...
Related: #910
Related: #797
This would be more of a column helper so when you define a column that you want a default to be a sequence, it sets everything up for you.
My thought is that this would automatiically create this column and a sequence as well as set the default value to that sequence.
Maybe something like that.... One tricky part is I don't think the crystal DB allows you to run multiple statements at once. We may need will/crystal-pg#253 to be implemented before this can be done...