2024-08-06 03:23:23 +00:00
|
|
|
## sqlite与postgres不同点
|
|
|
|
1.
|
2024-10-12 17:27:08 +00:00
|
|
|
sqlite: AUTOINCREAMENT
|
|
|
|
postgresql: GENERATED BY DEFAULT AS IDENTITY
|
2024-07-16 17:30:00 +00:00
|
|
|
|
2024-08-06 03:23:23 +00:00
|
|
|
2.
|
2024-10-12 17:27:08 +00:00
|
|
|
sqlite: datetime
|
|
|
|
postgresql: timestamp
|
2024-07-16 17:30:00 +00:00
|
|
|
|
2024-08-06 03:23:23 +00:00
|
|
|
3.
|
2024-10-12 17:27:08 +00:00
|
|
|
sqlite: update sqlite_sequence set seq = 1000 where name = 'sys_role' ;
|
|
|
|
postgresql: select setval('sys_role_id_seq', 1000);
|
2024-07-16 17:30:00 +00:00
|
|
|
|
2024-08-06 03:23:23 +00:00
|
|
|
4.
|
2024-10-12 17:27:08 +00:00
|
|
|
sqlite: "disabled" boolean DEFAULT (0)
|
|
|
|
postgresql: "disabled" boolean DEFAULT (false)
|
2024-07-16 17:30:00 +00:00
|
|
|
|
2024-08-06 03:23:23 +00:00
|
|
|
5.
|
2024-10-12 17:27:08 +00:00
|
|
|
sqlite: last_insert_rowid()
|
|
|
|
postgresql: LASTVAL()
|
2024-08-06 03:23:23 +00:00
|
|
|
|
|
|
|
6.
|
2024-10-12 17:27:08 +00:00
|
|
|
sqlite: integer
|
|
|
|
postgresql: bigint
|