Skip to content

Instantly share code, notes, and snippets.

@caike
Created December 11, 2025 15:00
Show Gist options
  • Select an option

  • Save caike/42a52310e38c724970b68adb718ffbab to your computer and use it in GitHub Desktop.

Select an option

Save caike/42a52310e38c724970b68adb718ffbab to your computer and use it in GitHub Desktop.
database school JOINS sql diff
121,125c121,127
< id bigint NOT NULL,
< name character varying(255) NOT NULL,
< email character varying(255) NOT NULL,
< department character varying(255) NOT NULL,
< created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP,
---
> id bigint NOT NULL,
> name character varying(255) NOT NULL,
> email character varying(255) NOT NULL,
> department character varying(255) NOT NULL,
> created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP,
> updated_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP
> );
126a129,132
> CREATE SEQUENCE former_employees_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
> ALTER SEQUENCE former_employees_id_seq OWNED BY current_employees.id;
> ALTER TABLE ONLY former_employees ALTER COLUMN id SET DEFAULT nextval('former_employees_id_seq'::regclass);
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment