Ok, I'll try to look for some tools as you suggested.
Thanks for your answer, I appreciate that.

Robert

On Tuesday, 30 March 2021 at 16:40:48 UTC+2 Jeremy Evans wrote:

> On Tue, Mar 30, 2021 at 6:22 AM Robert Pawlas <[email protected]> wrote:
>
>> Hello!
>>
>> I found problem during dumping schema with 
>>
>> DB.dump_schema_migration(same_db: true)
>>
>> The problem is indexes that include Sequel function as first parameter, 
>> are not being dumped.
>>
>> Here's sample index in create_table migration:
>>
>> Sequel.migration do
>>   change do
>>     create_table(:tests) do
>>        index Sequel.function(:lower, :name),
>>        name: :tests_unique_name_index,
>>         unique: true
>>      end
>>    end
>> end
>>
>> What I could find until now is that this method does not load all of the 
>> indexes from DB:
>>
>> https://github.com/jeremyevans/sequel/blob/2392145025c60d3c127bc1b921130598409f249c/lib/sequel/adapters/shared/postgres.rb#L648
>>
>>
> This is expected behavior: 
> http://sequel.jeremyevans.net/rdoc/files/doc/reflection_rdoc.html#label-Indexes+on+a+table
>
> The schema dumper doesn't handle database functions, triggers, views, 
> check constraints, etc. either.  It's fairly limited.  You should use the 
> database's tools if you want to dump schema and are using more than the 
> bare minimum of features.
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/fe8dce8b-aec8-4b9e-affe-94b73fbce944n%40googlegroups.com.

Reply via email to