mirror of
				https://github.com/Chocobozzz/PeerTube.git
				synced 2025-02-25 18:55:32 -06:00 
			
		
		
		
	Fix video source size column on db migration
This commit is contained in:
		@@ -45,7 +45,7 @@ import { cpus } from 'os'
 | 
			
		||||
 | 
			
		||||
// ---------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
const LAST_MIGRATION_VERSION = 830
 | 
			
		||||
const LAST_MIGRATION_VERSION = 835
 | 
			
		||||
 | 
			
		||||
// ---------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,24 @@
 | 
			
		||||
import * as Sequelize from 'sequelize'
 | 
			
		||||
 | 
			
		||||
async function up (utils: {
 | 
			
		||||
  transaction: Sequelize.Transaction
 | 
			
		||||
  queryInterface: Sequelize.QueryInterface
 | 
			
		||||
  sequelize: Sequelize.Sequelize
 | 
			
		||||
}): Promise<void> {
 | 
			
		||||
  const { transaction } = utils
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
    await utils.queryInterface.changeColumn('videoSource', 'size', {
 | 
			
		||||
      type: Sequelize.BIGINT,
 | 
			
		||||
      allowNull: true
 | 
			
		||||
    }, { transaction })
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function down (options) {
 | 
			
		||||
  throw new Error('Not implemented.')
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export {
 | 
			
		||||
  down, up
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user