mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
* TIMESTAMP type columns have been replaced by DATETIME. Depending on the version of MySQL and SQL_MODE, the DBMS does not accept to create TIMESTAMP NOT NULL columns without a default value;
45 lines
561 B
TypeScript
45 lines
561 B
TypeScript
import {
|
|
ICredentialNodeAccess,
|
|
} from 'n8n-workflow';
|
|
|
|
import {
|
|
ICredentialsDb,
|
|
} from '../../';
|
|
|
|
import {
|
|
Column,
|
|
Entity,
|
|
Index,
|
|
PrimaryGeneratedColumn,
|
|
} from 'typeorm';
|
|
|
|
@Entity()
|
|
export class CredentialsEntity implements ICredentialsDb {
|
|
|
|
@PrimaryGeneratedColumn()
|
|
id: number;
|
|
|
|
@Column({
|
|
length: 128
|
|
})
|
|
name: string;
|
|
|
|
@Column('text')
|
|
data: string;
|
|
|
|
@Index()
|
|
@Column({
|
|
length: 32
|
|
})
|
|
type: string;
|
|
|
|
@Column('json')
|
|
nodesAccess: ICredentialNodeAccess[];
|
|
|
|
@Column('datetime')
|
|
createdAt: Date;
|
|
|
|
@Column('datetime')
|
|
updatedAt: Date;
|
|
}
|