chore(server): run TS files directly (no compilation) (#5134)
* sort of works * type fixes * added option to run old way too
This commit is contained in:
committed by
GitHub
parent
e34a44bf66
commit
4b06f42db7
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.createTable('workspaces', (table) => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('workspaces', (table) => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('workspaces', (table) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('streams', (table) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.createTable('workspace_domains', (table) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('workspaces', (table) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('workspaces', (table) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('workspace_acl', (table) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('workspaces', (table) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('workspaces', (table) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('workspaces', (table) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.raw('update workspaces set slug = id')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.createTable('sso_providers', (table) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('user_sso_sessions', (table) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
const WORKSPACES_TABLE = 'workspaces'
|
||||
const REGIONS_TABLE = 'regions'
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.createTable('workspace_creation_state', (table) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
// there aren't that many workspaces.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
const USERS_TABLE = 'users'
|
||||
const WORKSPACES_TABLE = 'workspaces'
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('workspaces', (table) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
const WORKSPACE_JOIN_REQUESTS_TABLE = 'workspace_join_requests'
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
const TABLE_NAME = 'workspaces'
|
||||
const COLUMN_NAME = 'defaultProjectRole'
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
import { chunk } from 'lodash-es'
|
||||
|
||||
type WorkspaceAcl = {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('workspaces', (table) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('workspaces', (table) => {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Knex } from 'knex'
|
||||
import type { Knex } from 'knex'
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('workspaces', (table) => {
|
||||
|
||||
Reference in New Issue
Block a user