diff --git a/lib/sequel/plugins/microsecond_timestamp_precision.rb b/lib/sequel/plugins/microsecond_timestamp_precision.rb index 9838ccbd535..998fafe277c 100644 --- a/lib/sequel/plugins/microsecond_timestamp_precision.rb +++ b/lib/sequel/plugins/microsecond_timestamp_precision.rb @@ -2,8 +2,8 @@ module Sequel module Plugins module MicrosecondTimestampPrecision module DatasetMethods - def supports_timestamp_usecs? - true + def default_timestamp_format + "'%Y-%m-%d %H:%M:%S.%6N'" end end end diff --git a/spec/migrations/20231016094900_microsecond_timestamp_msql_asg_update_spec.rb b/spec/migrations/20231016094900_microsecond_timestamp_msql_asg_update_spec.rb index 8fa89ebffe3..0352eb52793 100644 --- a/spec/migrations/20231016094900_microsecond_timestamp_msql_asg_update_spec.rb +++ b/spec/migrations/20231016094900_microsecond_timestamp_msql_asg_update_spec.rb @@ -5,11 +5,7 @@ include_context 'migration' do let(:migration_filename) { '20231016094900_microsecond_timestamp_msql_asg_update.rb' } let(:ds) do - db[:asg_timestamps].with_extend do - def supports_timestamp_usecs? - true - end - end + db[:asg_timestamps].with_extend(Sequel::Plugins::MicrosecondTimestampPrecision::DatasetMethods) end end