{"id":17478011,"url":"https://github.com/thulio/ecto_diff_migrate","last_synced_at":"2025-03-28T12:11:17.406Z","repository":{"id":142393151,"uuid":"262630044","full_name":"thulio/ecto_diff_migrate","owner":"thulio","description":null,"archived":false,"fork":false,"pushed_at":"2020-05-11T03:47:02.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T04:11:58.726Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thulio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-09T18:06:53.000Z","updated_at":"2020-05-11T03:47:04.000Z","dependencies_parsed_at":"2024-04-19T06:46:06.124Z","dependency_job_id":null,"html_url":"https://github.com/thulio/ecto_diff_migrate","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"94d800cb69890df65837deaf04ecf4da75595d6a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thulio%2Fecto_diff_migrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thulio%2Fecto_diff_migrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thulio%2Fecto_diff_migrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thulio%2Fecto_diff_migrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thulio","download_url":"https://codeload.github.com/thulio/ecto_diff_migrate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246026111,"owners_count":20711581,"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":"2024-10-18T20:10:29.669Z","updated_at":"2025-03-28T12:11:17.348Z","avatar_url":"https://github.com/thulio.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Elixir CI](https://github.com/thulio/ecto_diff_migrate/workflows/Elixir%20CI/badge.svg)\n# EctoDiffMigrate\n\n`EctoDiffMigrate` [(documentation)](https://hexdocs.pm/ecto_diff_migrate) keeps track of database structure changes\nthrough diff files.\n\nDiff files make easier for a developer or database\nadministrator see and evaluate those changes before aplying them\nto a production database.\n\n\n## Installation\n\nAdd to your mix.exs:\n\n```elixir\ndef deps do\n  [\n    {:ecto_diff_migrate, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\n`EctoDiffMigrate` uses `Mix.Tasks.Ecto.Dump` under the hood and\nit requires `pg_dump` to be installed. `pg_dump` is (usually)\nbundled within `postgresql-client` package in most Linux distributions.\n\n## How to use\n\n`EctoDiffMigrate` provides a mix task `mix ecto.diff.migrate`.\nIt expects an  output directory (`--diff-output-dir`) to put the diff files in:\n\n```shell\nmix ecto.diff.migrate --diff-output-dir sql_diffs\n```\n\n```diff\n31a32,66\n\u003e -- Name: table; Type: TABLE; Schema: public; Owner: -\n\u003e --\n\u003e \n\u003e CREATE TABLE public.\"table\" (\n\u003e     id bigint NOT NULL\n\u003e );\n\u003e \n\u003e \n\u003e --\n\u003e -- Name: table_id_seq; Type: SEQUENCE; Schema: public; Owner: -\n\u003e --\n\u003e \n\u003e CREATE SEQUENCE public.table_id_seq\n\u003e     START WITH 1\n\u003e     INCREMENT BY 1\n\u003e     NO MINVALUE\n\u003e     NO MAXVALUE\n\u003e     CACHE 1;\n\u003e \n\u003e \n\u003e --\n\u003e -- Name: table_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -\n\u003e --\n\u003e \n\u003e ALTER SEQUENCE public.table_id_seq OWNED BY public.\"table\".id;\n\u003e \n\u003e \n\u003e --\n\u003e -- Name: table id; Type: DEFAULT; Schema: public; Owner: -\n\u003e --\n\u003e \n\u003e ALTER TABLE ONLY public.\"table\" ALTER COLUMN id SET DEFAULT nextval('public.table_id_seq'::regclass);\n\u003e \n\u003e \n\u003e --\n39a75,82\n\u003e -- Name: table table_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n\u003e --\n\u003e \n\u003e ALTER TABLE ONLY public.\"table\"\n\u003e     ADD CONSTRAINT table_pkey PRIMARY KEY (id);\n\u003e \n\u003e \n\u003e --\n42a86,87\n\u003e INSERT INTO public.\"schema_migrations\" (version) VALUES (20200509171630);\n\u003e \n```\n\n\n```diff\n36c36,37\n\u003c     id bigint NOT NULL\n---\n\u003e     id bigint NOT NULL,\n\u003e     \"column\" character varying(255)\n86c87\n\u003c INSERT INTO public.\"schema_migrations\" (version) VALUES (20200509171630);\n---\n\u003e INSERT INTO public.\"schema_migrations\" (version) VALUES (20200509171630), (20200509175658);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthulio%2Fecto_diff_migrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthulio%2Fecto_diff_migrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthulio%2Fecto_diff_migrate/lists"}