sqlite/magic.txt
drh 4ee09b4bcc Allocate 4 bytes of unused header space for an "Application ID". Add
the "PRAGMA application_id" command to set and query this identifier.
Add the "magic.txt" file to show how the posix file command might use
this application id.

FossilOrigin-Name: 28c9e7fdee2471a3026ee05ff591194d5f398131
2013-05-01 19:49:27 +00:00

29 lines
1.3 KiB
Plaintext

# This file contains suggested magic(5) text for the unix file(1)
# utility for recognizing SQLite3 databases.
#
# When SQLite is used as an application file format, it is desirable to
# have file(1) recognize the database file as being with the specific
# application. You can set the application_id for a database file
# using:
#
# PRAGMA application_id = INTEGER;
#
# INTEGER can be any signed 32-bit integer. That integer is written as
# a 4-byte big-endian integer into offset 68 of the database header. In
# the tests below, this integer is sometimes rendered as a string. For
# example, instead of "belong =1598444364" we write "string =_FSL" and
# instead of "belong =1598903374" we write "string =_MTN".
#
# The Monotone application used "PRAGMA user_version=1598903374;" to set
# its identifier long before "PRAGMA application_id" became available.
# The user_version is very similar to application_id except that it is
# stored at offset 60 instead of offset 68. The user of
# "PRAGMA application_id" is preferred now. The rules using offset 60
# for Monotone are for historical compatibility only.
#
0 string =SQLite\ format\ 3
>68 string =_FSL Fossil repository
>68 belong =0
>>60 string =_MTN Monotone source repository
>>60 string !_MTN SQLite 3.x database