This commit is contained in:
Your Name
2023-09-19 18:01:41 -04:00
parent 4db3ca30a9
commit d6eca5086f
5 changed files with 164 additions and 56 deletions

View File

@@ -1,13 +1,14 @@
package main
import (
"gitto.work/shortcut/scsusers"
"github.com/jmoiron/sqlx"
"flag"
"os"
"fmt"
_ "github.com/mattn/go-sqlite3"
)
"flag"
"fmt"
"os"
"git.teamworkapps.com/shortcut/scsusers"
"github.com/jmoiron/sqlx"
_ "github.com/mattn/go-sqlite3"
)
func main() {
var email string
@@ -27,14 +28,9 @@ func main() {
os.Exit(1)
}
schema:=`CREATE TABLE test_auth (
username text NOT NULL ,
password text NOT NULL,
email text NOT NULL unique,
recovery text NOT NULL DEFAULT '',
recoverytime timestamp null,
registration_date timestamp not null,
registration_ip text not null,
lastseen timestamp );`
id int primary key autoincrement,
username text NOT NULL unique key
password text NOT NULL);`
_ ,err=db.Exec(schema)
if err != nil {
fmt.Println("Schema creation failed: " + err.Error())