Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old migration system. #15373

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/backend-core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export * as configs from "./configs"
export * as events from "./events"
export * as migrations from "./migrations"
export * as users from "./users"
export * as userUtils from "./users/utils"
export * as roles from "./security/roles"
Expand Down
40 changes: 0 additions & 40 deletions packages/backend-core/src/migrations/definitions.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/backend-core/src/migrations/index.ts

This file was deleted.

186 changes: 0 additions & 186 deletions packages/backend-core/src/migrations/migrations.ts

This file was deleted.

This file was deleted.

64 changes: 0 additions & 64 deletions packages/backend-core/src/migrations/tests/migrations.spec.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
const _ = require("lodash/fp")
const { structures } = require("../../../tests")
import { range } from "lodash/fp"
import { structures } from "../.."

jest.mock("../../../src/context")
jest.mock("../../../src/db")

const context = require("../../../src/context")
const db = require("../../../src/db")
import * as context from "../../../src/context"
import * as db from "../../../src/db"

const { getCreatorCount } = require("../../../src/users/users")
import { getCreatorCount } from "../../../src/users/users"

describe("Users", () => {
let getGlobalDBMock
let paginationMock
let getGlobalDBMock: jest.SpyInstance
let paginationMock: jest.SpyInstance

beforeEach(() => {
jest.resetAllMocks()
Expand All @@ -22,11 +22,10 @@ describe("Users", () => {
jest.spyOn(db, "getGlobalUserParams")
})

it("Retrieves the number of creators", async () => {
const getUsers = (offset, limit, creators = false) => {
const range = _.range(offset, limit)
it("retrieves the number of creators", async () => {
const getUsers = (offset: number, limit: number, creators = false) => {
const opts = creators ? { builder: { global: true } } : undefined
return range.map(() => structures.users.user(opts))
return range(offset, limit).map(() => structures.users.user(opts))
}
const page1Data = getUsers(0, 8)
const page2Data = getUsers(8, 12, true)
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend-core/src/api/migrations.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { GetOldMigrationStatus } from "@budibase/types"
import { GetMigrationStatus } from "@budibase/types"
import { BaseAPIClient } from "./types"

export interface MigrationEndpoints {
getMigrationStatus: () => Promise<GetOldMigrationStatus>
getMigrationStatus: () => Promise<GetMigrationStatus>
}

export const buildMigrationEndpoints = (
Expand Down
1 change: 0 additions & 1 deletion packages/server/scripts/dev/manage.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ async function init() {
BB_ADMIN_USER_EMAIL: "",
BB_ADMIN_USER_PASSWORD: "",
PLUGINS_DIR: "",
HTTP_MIGRATIONS: "0",
HTTP_LOGGING: "0",
VERSION: "0.0.0+local",
PASSWORD_MIN_LENGTH: "1",
Expand Down
Loading
Loading