@@ -14,6 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
/**
|
||||
* @param {import('knex').Knex} knex
|
||||
*/
|
||||
exports.up = async function up(knex) {
|
||||
await knex.schema.createTable('notification', table => {
|
||||
table.uuid('id').primary();
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
/**
|
||||
* @param {import('knex').Knex} knex
|
||||
*/
|
||||
exports.up = async function up(knex) {
|
||||
await knex.schema.alterTable('notification', table => {
|
||||
table.text('link').nullable().alter();
|
||||
@@ -21,6 +26,9 @@ exports.up = async function up(knex) {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {import('knex').Knex} knex
|
||||
*/
|
||||
exports.down = async function down(knex) {
|
||||
await knex.schema.alterTable('notification', table => {
|
||||
table.text('link').notNullable().alter();
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
/**
|
||||
* @param {import('knex').Knex} knex
|
||||
*/
|
||||
exports.up = async function up(knex) {
|
||||
await knex.schema.createTable('broadcast', table => {
|
||||
table.uuid('id').primary();
|
||||
@@ -37,7 +42,7 @@ exports.up = async function up(knex) {
|
||||
|
||||
table
|
||||
.foreign('broadcast_id')
|
||||
.references(['id'])
|
||||
.references('id')
|
||||
.inTable('broadcast')
|
||||
.onDelete('CASCADE');
|
||||
table.unique(['broadcast_id', 'user'], {
|
||||
|
||||
@@ -13,6 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
/**
|
||||
* @param {import('knex').Knex} knex
|
||||
*/
|
||||
exports.up = async function up(knex) {
|
||||
await knex.schema.createTable('user_settings', table => {
|
||||
table.string('user').notNullable();
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
/**
|
||||
* @param {import('knex').Knex} knex
|
||||
*/
|
||||
exports.up = async function up(knex) {
|
||||
await knex.schema.alterTable('notification', table => {
|
||||
table.string('icon', 255).nullable();
|
||||
@@ -23,6 +28,9 @@ exports.up = async function up(knex) {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {import('knex').Knex} knex
|
||||
*/
|
||||
exports.down = async function down(knex) {
|
||||
await knex.schema.alterTable('notification', table => {
|
||||
table.dropColumn('icon');
|
||||
|
||||
@@ -13,8 +13,14 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
const crypto = require('crypto');
|
||||
|
||||
/**
|
||||
* @param {import('knex').Knex} knex
|
||||
*/
|
||||
exports.up = async function up(knex) {
|
||||
await knex.schema.alterTable('user_settings', table => {
|
||||
table.string('topic').nullable().after('origin');
|
||||
@@ -41,6 +47,9 @@ exports.up = async function up(knex) {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {import('knex').Knex} knex
|
||||
*/
|
||||
exports.down = async function down(knex) {
|
||||
await knex.schema.table('user_settings', table => {
|
||||
table.dropUnique([], 'user_settings_unique_idx');
|
||||
|
||||
Reference in New Issue
Block a user