xref: /sqlite-3.40.0/magic.txt (revision 875b95d4)
14ee09b4bSdrh# This file contains suggested magic(5) text for the unix file(1)
24ee09b4bSdrh# utility for recognizing SQLite3 databases.
34ee09b4bSdrh#
44ee09b4bSdrh# When SQLite is used as an application file format, it is desirable to
54ee09b4bSdrh# have file(1) recognize the database file as being with the specific
64ee09b4bSdrh# application.  You can set the application_id for a database file
74ee09b4bSdrh# using:
84ee09b4bSdrh#
94ee09b4bSdrh#     PRAGMA application_id = INTEGER;
104ee09b4bSdrh#
114ee09b4bSdrh# INTEGER can be any signed 32-bit integer.  That integer is written as
128a28a310Sdrh# a 4-byte big-endian integer into offset 68 of the database header.
134ee09b4bSdrh#
144ee09b4bSdrh# The Monotone application used "PRAGMA user_version=1598903374;" to set
154ee09b4bSdrh# its identifier long before "PRAGMA application_id" became available.
164ee09b4bSdrh# The user_version is very similar to application_id except that it is
17*875b95d4Sstephan# stored at offset 60 instead of offset 68.  The application_id pragma
188a28a310Sdrh# is preferred.  The rule using offset 60 for Monotone is for historical
198a28a310Sdrh# compatibility only.
204ee09b4bSdrh#
214ee09b4bSdrh0    string  =SQLite\ format\ 3
22b8a67ec8Sdrh>68  belong  =0x0f055112  Fossil checkout -
23b8a67ec8Sdrh>68  belong  =0x0f055113  Fossil global configuration -
2417f37c7dSdrh>68  belong  =0x0f055111  Fossil repository -
25178e7ee7Sdrh>68  belong  =0x42654462  Bentley Systems BeSQLite Database -
26178e7ee7Sdrh>68  belong  =0x42654c6e  Bentley Systems Localization File -
27b8a67ec8Sdrh>60  belong  =0x5f4d544e  Monotone source repository -
2817f37c7dSdrh>68  belong  =0x47504b47  OGC GeoPackage file -
29c0f1d0c6Sdrh>68  belong  =0x47503130  OGC GeoPackage version 1.0 file -
30c7401d51Sdrh>68  belong  =0x45737269  Esri Spatially-Enabled Database -
312fe70819Sdrh>68  belong  =0x4d504258  MBTiles tileset -
32*875b95d4Sstephan>68  belong  =0x6a035744  TeXnicard card database
33b8a67ec8Sdrh>0   string  =SQLite      SQLite3 database
34