adds language and resolution to torrent table

This commit is contained in:
TheBeastLT
2020-03-12 14:27:55 +01:00
parent 4dcb2ad9e5
commit a3cc795680
2 changed files with 18 additions and 12 deletions

View File

@@ -15,7 +15,9 @@ const Torrent = database.define('torrent',
type: { type: Sequelize.STRING(16), allowNull: false },
uploadDate: { type: Sequelize.DATE, allowNull: false },
seeders: { type: Sequelize.SMALLINT },
trackers: { type: Sequelize.STRING(4096) }
trackers: { type: Sequelize.STRING(4096) },
languages: { type: Sequelize.STRING(256) },
resolution: { type: Sequelize.STRING(16) }
}
);

View File

@@ -11,7 +11,8 @@ const Provider = database.define('provider', {
lastScrapedId: { type: Sequelize.STRING(128) }
});
const Torrent = database.define('torrent', {
const Torrent = database.define('torrent',
{
infoHash: { type: Sequelize.STRING(64), primaryKey: true },
provider: { type: Sequelize.STRING(32), allowNull: false },
torrentId: { type: Sequelize.STRING(128) },
@@ -20,8 +21,11 @@ const Torrent = database.define('torrent', {
type: { type: Sequelize.STRING(16), allowNull: false },
uploadDate: { type: Sequelize.DATE, allowNull: false },
seeders: { type: Sequelize.SMALLINT },
trackers: { type: Sequelize.STRING(4096) }
});
trackers: { type: Sequelize.STRING(4096) },
languages: { type: Sequelize.STRING(256) },
resolution: { type: Sequelize.STRING(16) }
}
);
const File = database.define('file',
{