sqlite_crypto 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81485ab3edd90e39dd41fb1c55ebf1342628a233d69f7adc6e52c04f1f507c6f
4
- data.tar.gz: de617f3d572a0113e0d82f372c8b775c1920d3c1637ae3f19ab32d4dd92446fc
3
+ metadata.gz: a5e909c16d387f92bcb301a08add4d2edd813fce79302a9f7c247d54f06f2c1c
4
+ data.tar.gz: 31a453e00780b6527dc4b99d11f87f69f0a9877e4577015f773c9534fda6bd5c
5
5
  SHA512:
6
- metadata.gz: 633d6fe21b1507f46af710c4732ffd18822ecc8639de6a625dbd9f0e03a2d032c461241279a834affab5f9008cf52b3364983506d2819176820b30392c53ad2b
7
- data.tar.gz: f98d8c7b022ba486f0125802651e1fb40f68bf413b4291b527349b9b4bd4c8683c99faca49eeafb9246668a84e8db543291d93fd38652006d8d91b3737edb621
6
+ metadata.gz: b10a9bc52e90ab7e49fff11ae79bef30ff4fe692b2e63f3156ed8ba2b530e06334a364835bf25c87247dbd1a05bae4549ee6831a7e59a0e5d8f67681a2cc865e
7
+ data.tar.gz: b3809788503904cf2b652e25b6b759aa2e2c10e8606788bbd1cefd59fbf3f1726a002311af8d73898571115bab013a4da2bf416c7818ae26d93e17d615e3f17f
data/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.1] - 2025-12-21
9
+
10
+ ### Fixed
11
+ - **Native Database Types**: Added `native_database_types` registration for `:uuid` and `:ulid`
12
+ - UUID columns now correctly create `varchar(36)` in migrations instead of literal `uuid` type
13
+ - ULID columns now correctly create `varchar(26)` in migrations instead of literal `ulid` type
14
+ - Schema dumper now works properly without "Unknown type" errors
15
+ - Fixes compatibility issue discovered during real-world usage
16
+
8
17
  ## [1.0.0] - 2025-12-20
9
18
 
10
19
  ### Added
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SQLite crypto
2
2
 
3
- [![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)](https://github.com/bart-oz/sqlite_crypto/releases)
3
+ [![Version](https://img.shields.io/badge/version-1.0.1-blue.svg)](https://github.com/bart-oz/sqlite_crypto/releases)
4
4
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.txt)
5
5
  [![Tests](https://img.shields.io/badge/tests-passing-brightgreen.svg)](https://github.com/bart-oz/sqlite_crypto/actions)
6
6
  [![Coverage](https://img.shields.io/badge/coverage-99.01%25-brightgreen.svg)](https://github.com/bart-oz/sqlite_crypto/actions)
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "sqlite_crypto/type/uuid"
4
4
  require "sqlite_crypto/type/ulid"
5
+ require "sqlite_crypto/sqlite3_adapter_extension"
5
6
 
6
7
  module SqliteCrypto
7
8
  class Railtie < ::Rails::Railtie
@@ -13,6 +14,11 @@ module SqliteCrypto
13
14
  ActiveRecord::Type.register(:ulid, SqliteCrypto::Type::ULID, adapter: :sqlite3)
14
15
  end
15
16
 
17
+ initializer "sqlite_crypto.native_types" do
18
+ require "active_record/connection_adapters/sqlite3_adapter"
19
+ ActiveRecord::ConnectionAdapters::SQLite3Adapter.prepend(SqliteCrypto::Sqlite3AdapterExtension)
20
+ end
21
+
16
22
  initializer "sqlite_crypto.schema_dumper", after: "active_record.initialize_database" do
17
23
  require "active_record/connection_adapters/sqlite3_adapter"
18
24
  require "sqlite_crypto/schema_dumper"
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SqliteCrypto
4
+ module Sqlite3AdapterExtension
5
+ def native_database_types
6
+ super.merge(
7
+ uuid: {name: "varchar", limit: 36},
8
+ ulid: {name: "varchar", limit: 26}
9
+ )
10
+ end
11
+ end
12
+ end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SqliteCrypto
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  RUBY_MINIMUM_VERSION = "3.1.0"
6
6
  RAILS_MINIMUM_VERSION = "7.1.0"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlite_crypto
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - BartOz
@@ -165,6 +165,7 @@ files:
165
165
  - lib/sqlite_crypto/model_extensions.rb
166
166
  - lib/sqlite_crypto/railtie.rb
167
167
  - lib/sqlite_crypto/schema_dumper.rb
168
+ - lib/sqlite_crypto/sqlite3_adapter_extension.rb
168
169
  - lib/sqlite_crypto/type/base.rb
169
170
  - lib/sqlite_crypto/type/ulid.rb
170
171
  - lib/sqlite_crypto/type/uuid.rb