File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { Column , Entity , PrimaryGeneratedColumn } from "typeorm" ;
22
3+ function Longtext ( ) {
4+ // Sqlite doesn't support longtext. I hate this, but it is what it is if we want
5+ // to keep backend tests and prepare tilt for the upcoming Hackaburg as quickly
6+ // as possible.
7+ if ( process . env . NODE_ENV === 'test' ) {
8+ return Column ( "text" ) ;
9+ }
10+ return Column ( "longtext" ) ;
11+ }
12+
313@Entity ( )
414export class Team {
515 @PrimaryGeneratedColumn ( )
@@ -10,7 +20,7 @@ export class Team {
1020 public users ! : number [ ] ;
1121 @Column ( )
1222 public teamImg ! : string ;
13- @Column ( "longtext" )
23+ @Longtext ( )
1424 public description ! : string ;
1525 @Column ( "simple-array" )
1626 public requests ! : number [ ] ;
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export class TestDatabaseService implements IDatabaseService {
4242 database : ":memory:" ,
4343 entities : [ join ( __dirname , "../../../src/entities/*" ) ] ,
4444 synchronize : true ,
45- type : "mysql " ,
45+ type : "sqlite " ,
4646 } ) ;
4747 }
4848}
You can’t perform that action at this time.
0 commit comments