Skip to content

Commit

Permalink
Various changes to support room settings
Browse files Browse the repository at this point in the history
  • Loading branch information
havfo committed Jul 11, 2024
1 parent b468baf commit 57f356d
Show file tree
Hide file tree
Showing 21 changed files with 849 additions and 267 deletions.
20 changes: 20 additions & 0 deletions certs/edumeet-demo-cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDWjCCAkKgAwIBAgIUGbtKs0LwPm1IGy6bD+WJIocLL7QwDQYJKoZIhvcNAQEL
BQAwZjELMAkGA1UEBhMCRVUxEDAOBgNVBAgMB2VkdW1lZXQxDTALBgNVBAcMBGRl
bW8xEDAOBgNVBAoMB2VkdW1lZXQxEDAOBgNVBAsMB2VkdW1lZXQxEjAQBgNVBAMM
CWxvY2FsaG9zdDAgFw0yMjEyMjExMTA5MjVaGA8yMjk2MTAwNDExMDkyNVowZjEL
MAkGA1UEBhMCRVUxEDAOBgNVBAgMB2VkdW1lZXQxDTALBgNVBAcMBGRlbW8xEDAO
BgNVBAoMB2VkdW1lZXQxEDAOBgNVBAsMB2VkdW1lZXQxEjAQBgNVBAMMCWxvY2Fs
aG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALHtbL07xpr0pCJR
eXZZ/Br/Zw2KoiyclqQ7LDBv6LSYmSf8phAKQhTb8LT1+D+rQdELtZB25JTZNpZ8
zsDL4yycAx2WpkLeonAcE8zxv95ou5qnYupzXbKSpXJVt9NaNlhEovoiXMECFP1V
wGweAsfy/8v6peC/8LiqUN4GmIKqtSA+mhr1Gulk6zLgKInY6RUc5dQ3A88eBVbJ
ERHbOBzmKbcbgTVnk+pClYM8BDbuJKX2DnNrcWsHDNFHbi2oWmCSKED6wKndXGmg
mD+lsS+Xrj4b0KVNYa/Nky/MYwlTMRxE7O6+B31c1iOldqJgVCIU1psRZr2o1m6R
mxMnwKkCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAjMdc9HZh30jI2IFMEL+dwFSM
0FCuDwQi7fa5XW1h/6r3s5aMEBzOU1aN/+eJBLiea1Jjh+Yvjlwsfd11mS6ZQFvn
lDM9WBD6q8wVduqZv+TlYJM2JWC8ryn8fpYx1msIoNAQbPFVlyRZkh0YTtu0QUUk
MgIZSe0SfshhlYjBZ78Fug9G8me3a7u/5N6hGQA20oMW4K1XBEWpD6BpgULoVNXB
+D4E+SiKHwFoVvksyHovv1a/kVbJiywyjF/yXQ/ZhlKlblN92RpZVbuOAsTWqh0F
7Y5mEm+T8UxXzRPP3U1qgLlMeRfZgtnEmD+XbkwHBZWg/BFrWv9QTzqfXyedKg==
-----END CERTIFICATE-----
28 changes: 28 additions & 0 deletions certs/edumeet-demo-key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCx7Wy9O8aa9KQi
UXl2Wfwa/2cNiqIsnJakOywwb+i0mJkn/KYQCkIU2/C09fg/q0HRC7WQduSU2TaW
fM7Ay+MsnAMdlqZC3qJwHBPM8b/eaLuap2Lqc12ykqVyVbfTWjZYRKL6IlzBAhT9
VcBsHgLH8v/L+qXgv/C4qlDeBpiCqrUgPpoa9RrpZOsy4CiJ2OkVHOXUNwPPHgVW
yRER2zgc5im3G4E1Z5PqQpWDPAQ27iSl9g5za3FrBwzRR24tqFpgkihA+sCp3Vxp
oJg/pbEvl64+G9ClTWGvzZMvzGMJUzEcROzuvgd9XNYjpXaiYFQiFNabEWa9qNZu
kZsTJ8CpAgMBAAECggEBALBqTKrEHgN+FU/BoMDsL79FBRS0JGA/Uk28LfBIxV5q
/1BafPziburnuB5005OtZjCzf26hs7qyNCG51fXrMnAEsEIiIO+kd0LZU/icqjUH
exu4Y6c6g+iO5mQbAY0ZoVCbnUyNzZHBUrZs08FfcDp4gY/qEZZqOW+fz1aVC5ph
pxbLRF8hWHxYkGh+OajQYdasC9eYu3ZUa6zGfQhO1sF4arT0mfpz7s6BmfyGnXNO
ekpV6CcmbeMUh+BVTReS1JV3XlT1RV3Ftq6Q+U9zNTihXMKYM+9HzJXcIH4J7Eqn
IQAJDJeh3SxMUfz0qkyuuyuBnbjjYrUHKxhy3v4RaZECgYEA6UaC9vgnyKoI90id
3HwtZ/T6S/rWKSbT226j/f23EPCDOnkK8M2yQxjM+GbqAhtwFuycjx1RDikWe5jH
kFRgppVl7Stdhbsh90Fb332/8EAC6j3g4jxzHBXePW5+RqrXL0m9ugTA3OHAq0s3
dxjvQjD5C7wF+bHaPBW1qJS9aXcCgYEAw0KhGldNoU1dUiHUWx9b4Yp7sNOj0QhS
2scXHvcpV2DFiTcaIkFsQOBlpfFgItCbfAwlHxgE97LTUr/04pKqagape1DKJiqW
UCplsHuAWAPePjGpU6U9sar7piW91K41vY8atqt26jmd2DOpfX2mbfrD+uzobXA+
3gxHqP3Wrt8CgYEA04fhElqMmOW3I6VxoJHqCq6WmXdn5AEVc5Gsm5EKBA5UsR05
0opz72v50fZglHCU//SnMw9+hLy1anZr4HDjA6vNtXbxY2cBsdhOmybIee9RtV9P
IVd3eixKTqJ3V1Vrs7HGnXvZ93Gu6KVYMmMl8nu+Genx8S5ZmsqE482cxJkCgYBO
Hdrr+d9x18ys7iHR7sLIgamofZM9LnJPWnUSi1k7vthoY+YNrFTNw7iG4gFPDFwY
DZfQT8C1BBLtOSSUfI626kFlt1WYXVNTcRLLvy0CiVGhWibe8u2ypbAVsWW3r5aK
ZrUOPZzOagyPEWQOc3Vg7ID5Y0w9dDmChjEpF5yKywKBgAc2gm5PLn8RH32kNfko
J+jYKkPEH1MXAVSpCDU8RF983qFJJy7MuuctEMOAOcyIeGWth7JJtqWLp5DFO5xi
wwqpQCO0kV4+BxOUO4osZFiuICeWo9nlXqHdxDiloInv5lhc9EarCdGD6w7I2F3r
zBCyXQk0+UBCzit6t1JKKOge
-----END PRIVATE KEY-----
27 changes: 20 additions & 7 deletions migrations/20230118072156_initial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Knex } from 'knex';
import bcrypt from 'bcryptjs';

export async function up(knex: Knex): Promise<void> {


await knex.schema.createTable('tenants', (table) => {
table.increments('id');
table.string('name');
Expand Down Expand Up @@ -111,15 +113,14 @@ export async function up(knex: Knex): Promise<void> {
table.unique([ 'roleId', 'permissionId' ], { useConstraint: true });
});

await knex.schema.createTable('rooms', (table) => {
await knex.schema.createTable('roomSettings', (table) => {
table.increments('id');
table.string('name');
table.string('description');
table.bigint('createdAt');
table.bigint('updatedAt');
table.bigint('creatorId').references('id').inTable('users');
table.bigint('tenantId').references('id').inTable('tenants').onDelete('CASCADE');
table.bigint('defaultRoleId').references('id').inTable('roles');
table.integer('tenantId').references('id').inTable('tenants').onDelete('CASCADE');
table.integer('ownerId').references('id').inTable('users').onDelete('CASCADE');

table.string('logo');
table.string('background');
Expand Down Expand Up @@ -154,6 +155,19 @@ export async function up(knex: Knex): Promise<void> {
table.boolean('screenSharingSimulcast');
table.string('screenSharingResolution');
table.integer('screenSharingFramerate');
});

await knex.schema.createTable('rooms', (table) => {
table.increments('id');
table.string('name');
table.string('description');
table.bigint('createdAt');
table.bigint('updatedAt');
table.bigint('creatorId').references('id').inTable('users');
table.bigint('tenantId').references('id').inTable('tenants').onDelete('CASCADE');
table.bigint('defaultRoleId').references('id').inTable('roles');
table.bigint('roomSettingsId').references('id').inTable('roomSettings');

table.unique([ 'tenantId', 'name' ], { useConstraint: true });
});

Expand Down Expand Up @@ -210,8 +224,7 @@ export async function up(knex: Knex): Promise<void> {

await knex.schema.createTable('mediaNodes', (table) => {
table.increments('id');
table.bigint('createdAt');
table.bigint('updatedAt');
table.string('description');
table.string('hostname');
table.integer('port');
table.string('secret');
Expand Down Expand Up @@ -246,4 +259,4 @@ export async function down(knex: Knex): Promise<void> {
await knex.schema.dropTable('trackers');
await knex.schema.dropTable('locations');
await knex.schema.dropTable('mediaNodes');
}
}
49 changes: 0 additions & 49 deletions migrations/202310138072158_migrate.ts

This file was deleted.

14 changes: 14 additions & 0 deletions migrations/20240220213036_media-nodes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// For more information about this file see https://dove.feathersjs.com/guides/cli/knexfile.html
import type { Knex } from 'knex'

export async function up(knex: Knex): Promise<void> {
await knex.schema.createTable('mediaNodes', (table) => {
table.increments('id')

table.string('text')
})
}

export async function down(knex: Knex): Promise<void> {
await knex.schema.dropTable('mediaNodes')
}
14 changes: 14 additions & 0 deletions migrations/20240229193330_room-settings.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// For more information about this file see https://dove.feathersjs.com/guides/cli/knexfile.html
import type { Knex } from 'knex'

export async function up(knex: Knex): Promise<void> {
await knex.schema.createTable('roomSettings', (table) => {
table.increments('id')

table.string('text')
})
}

export async function down(knex: Knex): Promise<void> {
await knex.schema.dropTable('roomSettings')
}
Loading

0 comments on commit 57f356d

Please # to comment.