Skip to content

Commit f8424de

Browse files
SferaDevXata
authored andcommitted
Fix bad merge
1 parent 26bdce0 commit f8424de

File tree

1 file changed

+0
-98
lines changed

1 file changed

+0
-98
lines changed

cli/src/commands/schema/edit.ts

Lines changed: 0 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -31,104 +31,6 @@ import {
3131
} from '../../migrations/pgroll.js';
3232
import EditSchemaOld from './edit-old.js';
3333

34-
export type BranchSchemaFormatted =
35-
| {
36-
schema: {
37-
tables: {
38-
name: string;
39-
uniqueConstraints: Schemas.BranchSchema['tables'][number]['uniqueConstraints'];
40-
checkConstraints: Schemas.BranchSchema['tables'][number]['checkConstraints'];
41-
foreignKeys: Schemas.BranchSchema['tables'][number]['foreignKeys'];
42-
columns: {
43-
name: string;
44-
type: string;
45-
unique: boolean;
46-
notNull: boolean;
47-
defaultValue: any;
48-
comment: string;
49-
}[];
50-
}[];
51-
};
52-
}
53-
| undefined;
54-
55-
export type ColumnData = {
56-
name: string;
57-
type: string;
58-
unique: boolean;
59-
nullable: boolean;
60-
defaultValue?: string;
61-
vector?: {
62-
dimension: number;
63-
};
64-
originalName: string;
65-
tableName: string;
66-
link?: {
67-
table: string;
68-
};
69-
file?: {
70-
defaultPublicAccess: boolean;
71-
};
72-
'file[]'?: {
73-
defaultPublicAccess: boolean;
74-
};
75-
};
76-
77-
export type AddTablePayload = {
78-
type: 'add-table';
79-
table: {
80-
name: string;
81-
};
82-
};
83-
84-
export type EditTablePayload = {
85-
type: 'edit-table';
86-
table: {
87-
name: string;
88-
newName: string;
89-
};
90-
};
91-
92-
export type DeleteTablePayload = {
93-
name: string;
94-
};
95-
96-
export type AddColumnPayload = {
97-
type: 'add-column';
98-
tableName: string;
99-
column: ColumnData;
100-
};
101-
102-
export type EditColumnPayload = {
103-
type: 'edit-column';
104-
column: ColumnData;
105-
};
106-
107-
export type DeleteColumnPayload = { [tableName: string]: string[] };
108-
109-
export type FormatPayload = {
110-
type: 'space' | 'migrate' | 'schema';
111-
};
112-
113-
export type SelectChoice = {
114-
name: FormatPayload | AddTablePayload | EditTablePayload | AddColumnPayload | EditColumnPayload;
115-
message: string;
116-
role?: string;
117-
choices?: SelectChoice[];
118-
disabled?: boolean;
119-
hint?: string;
120-
};
121-
122-
export type ValidationState = {
123-
values: { name: string };
124-
items: { name: string; input: string }[];
125-
fields: { name: string; initial: string }[];
126-
};
127-
128-
export type ColumnAdditions = { [tableName: string]: { [columnName: string]: AddColumnPayload['column'] } };
129-
130-
export type ColumnEdits = { [tableName: string]: { [columnName: string]: AddColumnPayload['column'] } };
131-
13234
const { Select, Snippet, Confirm } = enquirer as any;
13335

13436
const xataTypes = [

0 commit comments

Comments
 (0)