Commit graph

90 commits

Author SHA1 Message Date
Joseph Schorr
045614c6c8 Merge branch 'master' into ackbar 2015-02-09 17:16:42 -05:00
Joseph Schorr
e1c5ccb7d6 Fixes 2015-02-05 17:37:58 -05:00
Joseph Schorr
a12bfa7623 Add migration for the new tables for signatures 2015-02-05 15:30:45 -05:00
Joseph Schorr
c8229b9c8a Implement new step-by-step setup 2015-01-23 17:19:15 -05:00
Jimmy Zelinskie
b18986c72b Continuation of baa4918d89. 2015-01-06 15:11:37 -05:00
Jimmy Zelinskie
baa4918d89 Explicitly declare length of large MySQL indices.
Most MySQL installs silently truncate indices at a specific number of bytes.
This value is 767 bytes unless either the innodb_large_prefix option is turned
on or the innodb_page_size has been changed. This change explicitly limits the
size of large indices to 767 characters due to the latin1 charset being 1 byte
per char.
2015-01-06 14:55:31 -05:00
Jimmy Zelinskie
84f6cc7385 add percona to migration tests 2014-12-23 18:34:02 -05:00
Jimmy Zelinskie
977782d047 Add MariaDB to migration.sh 2014-12-22 15:34:17 -05:00
Jimmy Zelinskie
eeeb2e620c move slackwebhook migration from tools to util
tools isn't shipped inside of the container because it contains private
keys
2014-12-18 13:22:13 -05:00
Joseph Schorr
107847a4bb Fix Slack notification setup to support the new slack web hook format and convert all existing data to use the new format (so we only have one code path) 2014-12-16 14:34:43 +02:00
Jimmy Zelinskie
716d7a737b Strip whitespace from ALL the things. 2014-11-24 16:07:38 -05:00
Jimmy Zelinskie
c918d15979 Add a migration for backfilling user UUIDs. 2014-11-20 18:28:54 -05:00
Jake Moshenko
2b8c246476 Temporarily put user rename behind a feature flag. Switch queue names back to using the username for namespace while we figure out a real migration strategy. 2014-11-20 15:36:39 -05:00
Jimmy Zelinskie
e6742b00b0 Remove backfill from UUID migration 2014-11-20 14:04:12 -05:00
Jake Moshenko
ac0d0ce36a Change the order of migrations to allow migration code to work with the updated model. 2014-11-19 15:58:47 -05:00
Jake Moshenko
e863b96166 Tweak the uuid backfill to leave the uuid column nullable. 2014-11-19 15:32:30 -05:00
Jimmy Zelinskie
7c8a438b58 Rebase migration on top of master and add backfill. 2014-11-19 14:07:54 -05:00
Jimmy Zelinskie
606ad21bec Apply reviewed changes.
Adds a length to the UUID field, renames QuayDeferredPermissionUser
parameter id->uuid, adds transactions to backfill script.
2014-11-19 13:28:16 -05:00
Jimmy Zelinskie
9d677b8eb3 Add UUID to User model and use in cookie. 2014-11-19 13:28:16 -05:00
Jake Moshenko
17fc72d262 Switch postgres to a non-transactional DDL to allow us to use peewee to modify data in migrations: enterprise customers are running postgres migrations offline already. Move the image backfill script back to a migration since it will now work. Unify the interface to sending a DB URI to env.py for the migration script. 2014-11-18 14:07:33 -05:00
Jake Moshenko
f4681f2c18 Merge branch 'master' into nomenclature
Conflicts:
	test/data/test.db
2014-11-17 17:59:59 -05:00
Joseph Schorr
178c5a7ac0 Add an index to the docker_image_id for faster lookup 2014-11-13 12:51:50 -05:00
Joseph Schorr
29c30b336e Move the uncompressed image size migration call outside of alembic, since it will sometimes deadlock with certain kinds of DBs (because alembic is running things inside a transaction) 2014-11-03 21:01:41 -05:00
Joseph Schorr
9aa72c5cc2 Fix migration issues:
- MySQL 5.5 doesn't support the now() call as a default
  - Postgres migration isn't auto-committed, so we have to check if the table exists first
2014-11-03 15:25:55 -05:00
Joseph Schorr
c1398c6d2b - Add a log entry for repo verb handling and make the container usage calculation take it into account
- Move all the repo push/pull/verb logging into a central track_and_log method
- Readd images accidentally deleted in the last CL
- Make the uncompressed size migration script better handle exceptions
2014-10-29 15:42:44 -04:00
Jake Moshenko
1461310ab8 Merge remote-tracking branch 'origin/master' into nomenclature
Conflicts:
	endpoints/common.py
	endpoints/notificationhelper.py
	test/data/test.db
	workers/dockerfilebuild.py
2014-10-23 13:25:37 -04:00
Jake Moshenko
c34a8b6727 Fix the squashed image migration to insert the proper image transformation type. 2014-10-08 11:47:02 -04:00
Jake Moshenko
bbcdf18fdd Update the migration to reflect the state of the database. 2014-10-07 16:19:05 -04:00
Jake Moshenko
1968c67cba Merge remote-tracking branch 'origin/laffa' into nomenclature 2014-10-07 16:09:45 -04:00
Jake Moshenko
626d984fb2 Fixes to the migration generator script. 2014-10-07 16:09:30 -04:00
Jake Moshenko
fe59ad4fb5 Rectify our prod database, previous migrations, and database definition files. 2014-10-07 16:03:57 -04:00
Jake Moshenko
c77a3dc6ea Update the migration for translating queue names to take into account previous migrations. 2014-10-07 15:57:17 -04:00
Jake Moshenko
a0d94f9d59 Merge remote-tracking branch 'origin/laffa' into nomenclature
Conflicts:
	test/data/test.db
2014-10-07 15:56:28 -04:00
Jake Moshenko
ee9973a395 Merge remote-tracking branch 'origin/master' into nomenclature 2014-10-07 15:43:59 -04:00
Joseph Schorr
f4daa5e97b - Update the migrations tool to verify migrations work up and down for both MySQL and PostgresSQL.
- Add migrations for the squashed image tables and for backfilling the uncompressed sizes
- Make sure gzip stream uses a max length when determining the uncompressed size
2014-10-07 15:29:56 -04:00
Joseph Schorr
f38ce51943 Merge master into laffa 2014-10-07 14:03:17 -04:00
Jake Moshenko
4ad592e7ce Add an index to the image storage uuid to improve performance. 2014-10-06 18:44:37 -04:00
Jake Moshenko
c4266140e2 Fix all of the upgrades and downgrades to work on both mysql and postgres. 2014-10-06 16:41:49 -04:00
Jake Moshenko
ed8bcff39e Merge remote-tracking branch 'origin/master' into nomenclature
Conflicts:
	test/data/test.db
	workers/dockerfilebuild.py
2014-10-06 10:29:39 -04:00
Jake Moshenko
5c18ffe67d Allow the namespace column to be null, and also non-unique. Fix the uncompressed size clobbering the size on the wire field. Add metadata constraints so that foreign key constraints get predictable names. Fix all downgrade migrations. 2014-10-02 10:46:20 -04:00
Jake Moshenko
e8b3d1cc4a Phase 4 of the namespace to user migration: actually remove the column from the db and remove the dependence on serialized namespaces in the workers and queues 2014-10-01 14:23:46 -04:00
Jake Moshenko
ae9026ee91 MySQL will not allow us to revoke the possibility for the namespace_user column to be nullable. 2014-09-26 14:50:26 -04:00
Jake Moshenko
21d8c41320 Add the existing types to the alter column to make MySQL happy. 2014-09-26 12:58:03 -04:00
Jake Moshenko
e9745dbc96 Fix the SQL migration. 2014-09-26 11:17:42 -04:00
Jake Moshenko
03190efde3 Phase 2 of migrating repo namespaces to referencing user objects, backfilling the rows without a value for namespace_user, and changing all accesses to go through the namespace_user object. All tests are passing, manual testing still required. 2014-09-24 18:01:35 -04:00
Jake Moshenko
798c13aec8 Fix the migration to use the proper column name that peewee expects. 2014-09-23 14:20:15 -04:00
Jake Moshenko
b6d635b648 Fix the migration to use the proper base. 2014-09-23 14:04:20 -04:00
Joseph Schorr
86dfca2e3e Add uncompressed size field to the image storage and add a backfill script (which is not yet automatically called) 2014-09-23 14:01:27 -04:00
Jake Moshenko
3259cda000 The new strategy is to do a three phase migration. This is the first phase: getting the namespace user in the db and written for all new repositories. 2014-09-22 17:27:02 -04:00
Joseph Schorr
297c8ad29c Add migration to backfill uncompressed image sizes on the storage 2014-09-22 15:04:28 -04:00