Skip to content
Snippets Groups Projects

Include coverage reports from child pipeline

All threads resolved!
1 file
+ 24
0
Compare changes
  • Side-by-side
  • Inline
@@ -78,6 +78,30 @@ class AddUserIdAndStateIndexToMergeRequestReviewers < Gitlab::Database::Migratio
end
```
#### Example: Add a new table to store in a single database
1. Define the [GitLab Schema](multiple_databases.md#gitlab-schema) of the table in [`lib/gitlab/database/gitlab_schemas.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/database/gitlab_schemas.yml):
```yaml
ssh_signatures: :gitlab_main
```
1. Create the table in a schema migration:
```ruby
class CreateSshSignatures < Gitlab::Database::Migration[2.0]
def change
create_table :ssh_signatures do |t|
t.timestamps_with_timezone null: false
t.bigint :project_id, null: false, index: true
t.bigint :key_id, null: false, index: true
t.integer :verification_status, default: 0, null: false, limit: 2
t.binary :commit_sha, null: false, index: { unique: true }
end
end
end
```
### Data Manipulation Language (DML)
The DML migrations are all migrations that:
Loading