We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can Clear support unique constraints on multiple columns? for example:
CREATE TABLE table ( c1 data_type, c2 data_type, c3 data_type, UNIQUE (c2, c3) );
The text was updated successfully, but these errors were encountered:
@jubishop yes, you can create it with Clear migrations
For example:
class CreateUsers include Clear::Migration def change(direction) direction.up do create_table(:users) do |t| t.column :provider, :string, null: false t.column :provider_id, :integer, null: false t.column :name, :string t.column :created_at, :timestamp t.column :synced_at, :timestamp, null: false t.index [:provider, :provider_id], using: :btree, unique: true end end direction.down do execute("DROP TABLE users") end end end
https://clear.gitbook.io/project/migrations/call-migration-script
Sorry, something went wrong.
No branches or pull requests
can Clear support unique constraints on multiple columns? for example:
The text was updated successfully, but these errors were encountered: