Skip to content
Snippets Groups Projects
Commit 5a5df0ee authored by Olivér FACKLAM's avatar Olivér FACKLAM
Browse files

Merge branch 'change_GraphQL' into 'LDAP_changes'

New tables into `LDAP_changes`

See merge request br/sigma-backend!37
parents bfedaf5b 1d9d0a52
No related branches found
No related tags found
No related merge requests found
exports.up = function (knex, Promise) {
return knex.schema.createTable('announcements_authors', function (table) {
table.increments('id'); //autoincrementing (non-nullable) primary key
table.integer('mid').notNullable()
.references('mid').inTable('messages_announcements')
.onDelete('CASCADE'); //if announcement is deleted, also delete authors
table.string('gid', 128).notNullable()
.references('gid').inTable('groups')
.onDelete('CASCADE'); //if group is deleted, also delete authors
});
};
exports.down = function (knex, Promise) {
return knex.schema.dropTable('announcements_authors');
};
exports.up = function (knex, Promise) {
return knex.schema.createTable('announcements_recipients', function (table) {
table.increments('id'); //autoincrementing (non-nullable) primary key
table.integer('mid').notNullable()
.references('mid').inTable('messages_announcements')
.onDelete('CASCADE'); //if announcement is deleted, also delete recipients
table.string('gid', 128).notNullable()
.references('gid').inTable('groups')
.onDelete('CASCADE'); //if group is deleted, also delete recipient
});
};
exports.down = function (knex, Promise) {
return knex.schema.dropTable('announcements_recipients');
};
exports.up = function (knex, Promise) {
return knex.schema.createTable('events_authors', function (table) {
table.increments('id'); //autoincrementing (non-nullable) primary key
table.integer('mid').notNullable()
.references('mid').inTable('messages_events')
.onDelete('CASCADE'); //if event is deleted, also delete authors
table.string('gid', 128).notNullable()
.references('gid').inTable('groups')
.onDelete('CASCADE'); //if group is deleted, also delete authors
});
};
exports.down = function (knex, Promise) {
return knex.schema.dropTable('events_authors');
};
exports.up = function (knex, Promise) {
return knex.schema.createTable('events_recipients', function (table) {
table.increments('id'); //autoincrementing (non-nullable) primary key
table.integer('mid').notNullable()
.references('mid').inTable('messages_events')
.onDelete('CASCADE'); //if event is deleted, also delete recipients
table.string('gid', 128).notNullable()
.references('gid').inTable('groups')
.onDelete('CASCADE'); //if group is deleted, also delete recipient
});
};
exports.down = function (knex, Promise) {
return knex.schema.dropTable('events_recipients');
};
......@@ -37,7 +37,7 @@ type User {
# Pour le contacter
mail: String
phone: String
addresses: [String] # Adresse(s) de l'utilisateur (numero de casert par exemple)
address: String # Adresse de l'utilisateur (numero de casert par exemple)
# Ses interactions avec des groupes
memberOf: [Group] # Groupes dont l'utilisateur est membre
......@@ -139,7 +139,7 @@ type SimpleGroup implements Group {
groupCoauthorEventRequestsToGroup: [GroupCoauthorEvent]
# Graphe organique des groupes
parent: SimpleGroup # Groupe parent
parents: [SimpleGroup] # Groupe parent
children: [SimpleGroup] # Groupes enfants
memberOfMeta: [MetaGroup]
visibilityEdges: [Group] # se rendre visible par des groupes en plus du graphe organique
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment