Skip to content

Commit 37849d0

Browse files
authored
Merge pull request #122 from NeuroJSON/dev-fan
Feature: Dataset Interaction, Organization, and Processing with Autobidsify Integration
2 parents 00bc31c + 438b418 commit 37849d0

File tree

68 files changed

+13573
-125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+13573
-125
lines changed

.github/workflows/build-deploy-zodiac.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
# PUBLIC_URL="/dev/${{ env.BRANCH_NAME }}/" yarn build
3737
export PUBLIC_URL="/dev/${{ env.BRANCH_NAME }}/"
3838
export REACT_APP_API_URL="/dev/${{ env.BRANCH_NAME }}/api/v1"
39-
export REACT_APP_USE_CORS=true
39+
export REACT_APP_USE_CORS=false
4040
yarn build
4141
4242
- name: Copy JS libraries (jdata, bjdata etc.)
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
"use strict";
2+
3+
/** @type {import('sequelize-cli').Migration} */
4+
module.exports = {
5+
async up(queryInterface, Sequelize) {
6+
await queryInterface.createTable("collections", {
7+
id: {
8+
type: Sequelize.INTEGER,
9+
autoIncrement: true,
10+
primaryKey: true,
11+
allowNull: false,
12+
},
13+
user_id: {
14+
type: Sequelize.INTEGER,
15+
allowNull: false,
16+
references: {
17+
model: "users",
18+
key: "id",
19+
},
20+
onUpdate: "CASCADE",
21+
onDelete: "CASCADE",
22+
},
23+
name: {
24+
type: Sequelize.STRING(100),
25+
allowNull: false,
26+
},
27+
description: {
28+
type: Sequelize.TEXT,
29+
allowNull: true,
30+
},
31+
is_public: {
32+
type: Sequelize.BOOLEAN,
33+
defaultValue: false,
34+
allowNull: false,
35+
},
36+
created_at: {
37+
type: Sequelize.DATE,
38+
allowNull: false,
39+
defaultValue: Sequelize.literal("CURRENT_TIMESTAMP"),
40+
},
41+
updated_at: {
42+
type: Sequelize.DATE,
43+
allowNull: false,
44+
defaultValue: Sequelize.literal("CURRENT_TIMESTAMP"),
45+
},
46+
});
47+
48+
// Add indexes
49+
await queryInterface.addIndex("collections", ["user_id"], {
50+
name: "collections_user_id_idx",
51+
});
52+
53+
await queryInterface.addIndex("collections", ["user_id", "name"], {
54+
unique: true,
55+
name: "collections_user_name_unique",
56+
});
57+
},
58+
59+
async down(queryInterface, Sequelize) {
60+
await queryInterface.dropTable("collections");
61+
},
62+
};
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
"use strict";
2+
3+
/** @type {import('sequelize-cli').Migration} */
4+
module.exports = {
5+
async up(queryInterface, Sequelize) {
6+
await queryInterface.createTable("collection_datasets", {
7+
id: {
8+
type: Sequelize.INTEGER,
9+
autoIncrement: true,
10+
primaryKey: true,
11+
allowNull: false,
12+
},
13+
collection_id: {
14+
type: Sequelize.INTEGER,
15+
allowNull: false,
16+
references: {
17+
model: "collections",
18+
key: "id",
19+
},
20+
onUpdate: "CASCADE",
21+
onDelete: "CASCADE",
22+
},
23+
dataset_id: {
24+
type: Sequelize.INTEGER,
25+
allowNull: false,
26+
references: {
27+
model: "datasets",
28+
key: "id",
29+
},
30+
onUpdate: "CASCADE",
31+
onDelete: "CASCADE",
32+
},
33+
created_at: {
34+
type: Sequelize.DATE,
35+
allowNull: false,
36+
defaultValue: Sequelize.literal("CURRENT_TIMESTAMP"),
37+
},
38+
});
39+
40+
// Add indexes
41+
await queryInterface.addIndex("collection_datasets", ["collection_id"], {
42+
name: "collection_datasets_collection_id_idx",
43+
});
44+
45+
await queryInterface.addIndex("collection_datasets", ["dataset_id"], {
46+
name: "collection_datasets_dataset_id_idx",
47+
});
48+
49+
await queryInterface.addIndex(
50+
"collection_datasets",
51+
["collection_id", "dataset_id"],
52+
{
53+
unique: true,
54+
name: "collection_datasets_unique",
55+
}
56+
);
57+
},
58+
59+
async down(queryInterface, Sequelize) {
60+
await queryInterface.dropTable("collection_datasets");
61+
},
62+
};
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
"use strict";
2+
3+
/** @type {import('sequelize-cli').Migration} */
4+
module.exports = {
5+
async up(queryInterface, Sequelize) {
6+
await queryInterface.createTable("projects", {
7+
id: {
8+
type: Sequelize.INTEGER,
9+
autoIncrement: true,
10+
primaryKey: true,
11+
allowNull: false,
12+
},
13+
user_id: {
14+
type: Sequelize.INTEGER,
15+
allowNull: false,
16+
references: {
17+
model: "users",
18+
key: "id",
19+
},
20+
onUpdate: "CASCADE",
21+
onDelete: "CASCADE",
22+
},
23+
name: {
24+
type: Sequelize.STRING(200),
25+
allowNull: false,
26+
},
27+
public_id: {
28+
type: Sequelize.STRING(12),
29+
allowNull: false,
30+
unique: true,
31+
defaultValue: "",
32+
},
33+
description: {
34+
type: Sequelize.TEXT,
35+
allowNull: true,
36+
},
37+
extractor_state: {
38+
type: Sequelize.JSON,
39+
allowNull: true,
40+
},
41+
created_at: {
42+
type: Sequelize.DATE,
43+
allowNull: false,
44+
defaultValue: Sequelize.literal("CURRENT_TIMESTAMP"),
45+
},
46+
updated_at: {
47+
type: Sequelize.DATE,
48+
allowNull: false,
49+
defaultValue: Sequelize.literal("CURRENT_TIMESTAMP"),
50+
},
51+
});
52+
// Add indexes
53+
await queryInterface.addIndex("projects", ["user_id"], {
54+
name: "projects_user_id_idx",
55+
});
56+
},
57+
58+
async down(queryInterface, Sequelize) {
59+
await queryInterface.dropTable("projects");
60+
},
61+
};

backend/package-lock.json

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"dotenv": "^17.2.3",
3030
"express": "^5.1.0",
3131
"jsonwebtoken": "^9.0.2",
32+
"nanoid": "^3.3.11",
3233
"nodemailer": "^7.0.11",
3334
"passport": "^0.7.0",
3435
"passport-google-oauth20": "^2.0.0",

0 commit comments

Comments
 (0)