Skip to content

Commit 436e79d

Browse files
authored
Merge pull request #4796 from Nealsoni00/patch-1
[FIX] Update active_record_backend.md to have migration in correct order
2 parents 0071bb0 + b2bc43e commit 436e79d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

guides/operation_store/active_record_backend.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ def change
3333
add_index :graphql_clients, :name, unique: true
3434
add_index :graphql_clients, :secret, unique: true
3535

36+
create_table :graphql_operations, primary_key: :id do |t|
37+
t.column :digest, :string, null: false
38+
t.column :body, :text, null: false
39+
t.column :name, :string, null: false
40+
t.timestamps
41+
end
42+
add_index :graphql_operations, :digest, unique: true
43+
3644
create_table :graphql_client_operations, primary_key: :id do |t|
3745
t.references :graphql_client, null: false
3846
t.references :graphql_operation, null: false
@@ -44,14 +52,6 @@ def change
4452
add_index :graphql_client_operations, [:graphql_client_id, :alias], unique: true, name: "graphql_client_operations_pairs"
4553
add_index :graphql_client_operations, :is_archived
4654

47-
create_table :graphql_operations, primary_key: :id do |t|
48-
t.column :digest, :string, null: false
49-
t.column :body, :text, null: false
50-
t.column :name, :string, null: false
51-
t.timestamps
52-
end
53-
add_index :graphql_operations, :digest, unique: true
54-
5555
create_table :graphql_index_entries, primary_key: :id do |t|
5656
t.column :name, :string, null: false
5757
end

0 commit comments

Comments
 (0)