{"id":24755247,"url":"https://github.com/katzer/primary_key_type_replacer","last_synced_at":"2026-05-02T15:41:37.310Z","repository":{"id":10001136,"uuid":"12035034","full_name":"katzer/primary_key_type_replacer","owner":"katzer","description":"ActiveRecord plugin to replace the primary key type","archived":false,"fork":false,"pushed_at":"2013-11-18T08:46:22.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T12:41:56.200Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/katzer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-11T11:32:25.000Z","updated_at":"2014-05-12T21:04:36.000Z","dependencies_parsed_at":"2022-09-22T02:02:40.985Z","dependency_job_id":null,"html_url":"https://github.com/katzer/primary_key_type_replacer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fprimary_key_type_replacer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fprimary_key_type_replacer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fprimary_key_type_replacer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fprimary_key_type_replacer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/katzer","download_url":"https://codeload.github.com/katzer/primary_key_type_replacer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245061379,"owners_count":20554563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-28T12:37:56.033Z","updated_at":"2026-05-02T15:41:32.288Z","avatar_url":"https://github.com/katzer.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"PrimaryKeyTypeReplacer\n========================\n\nActiveRecord plugin to replace the primary key type of your database tables.\n\nShould work with all supported activerecord adapters. Tested with\n- mysql2\n- sqlite3\n- oracle_enhanced\n\nby Sebastián Katzer ([github.com/katzer](https://github.com/katzer))\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'primary_key_type_replacer'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install primary_key_type_replacer\n\n## Usage\nThis gem adds the **singleton method** `replace_primary_key_type_with(_type_)` to your migration files.\u003cbr\u003e\nSee example below how to use it to disable the *autoincrement* feature.\n```ruby\nclass CreateTableWithoutAutoIncrement \u003c ActiveRecord::Migration\n  # Setzt den Typ des Primärschlüssels\n  replace_primary_key_type_with case adapter_name\n                                when 'Mysql2'\n                                  'int(11) NOT NULL PRIMARY KEY'\n                                when 'SQLite'\n                                  'INTEGER PRIMARY KEY NOT NULL'\n                                end\n\n  def change\n    # Erstellt die Tabelle mit dem neuen Primärschlüsseltypen\n    create_table :table_without_auto_increment_id do |t|\n      # ...\n    end\n  end\nend\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatzer%2Fprimary_key_type_replacer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkatzer%2Fprimary_key_type_replacer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatzer%2Fprimary_key_type_replacer/lists"}