Fenrirthviti / stream-site

Rachni - nginx RTMP streaming front end
Other
195 stars 71 forks source link

sql import error #20

Closed kimmoda closed 7 years ago

kimmoda commented 7 years ago

Hello , ı some sql import error.

Fenrirthviti commented 7 years ago

Can you provide the full error, and on which .sql file you get it on?

Also, which version of PGSQL are you using?

kimmoda commented 7 years ago

SQL hatası:

ERROR: syntax error at or near "CREATE" LINE 5: CREATE TABLE subscribers ^ Üstteki hata, aşağıdaki ifade içinde oluştu:

SELECT COUNT(*) AS total FROM (-- Table: subscribers

-- DROP TABLE subscribers;

CREATE TABLE subscribers ( host_account text NOT NULL, subscriber text NOT NULL, CONSTRAINT subscribers_pk PRIMARY KEY (host_account, subscriber), CONSTRAINT host_account_fk FOREIGN KEY (host_account) REFERENCES users (email) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE ) WITH ( OIDS=FALSE ); ALTER TABLE subscribers OWNER TO pg_sql_account_here; COMMENT ON TABLE subscribers IS 'Table for managing subscribers for channels') AS sub

kimmoda commented 7 years ago

PostgreSQL 8.4.20

Fenrirthviti commented 7 years ago

You need to change pg_sql_account_here to your local PostgreSQL account.

kimmoda commented 7 years ago

editing , but still this error

ss6

CREATE TABLE subscribers ( host_account text NOT NULL, subscriber text NOT NULL, CONSTRAINT subscribers_pk PRIMARY KEY (host_account, subscriber), CONSTRAINT host_account_fk FOREIGN KEY (host_account) REFERENCES users (email) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE ) WITH ( OIDS=FALSE )

MySQL çıktısı: Belgeler

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(

OIDS=FALSE )' at line 10

my sql

-- Table: subscribers

-- DROP TABLE subscribers;

CREATE TABLE subscribers ( host_account text NOT NULL, subscriber text NOT NULL, CONSTRAINT subscribers_pk PRIMARY KEY (host_account, subscriber), CONSTRAINT host_account_fk FOREIGN KEY (host_account) REFERENCES users (email) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE ) WITH ( OIDS=FALSE ); ALTER TABLE subscribers OWNER TO admin_1; COMMENT ON TABLE subscribers IS 'Table for managing subscribers for channels';

kimmoda commented 7 years ago

error

Fenrirthviti commented 7 years ago

I've just tested creating a new table using this exact query with no errors.

success

Fenrirthviti commented 7 years ago

It looks like whatever editor/administration tool that you're using is causing the problem. I would recommend trying to import directly from CLI or pgAdmin III if possible.

kimmoda commented 7 years ago

this is my line

-- Table: subscribers

-- DROP TABLE subscribers;

host_account text NOT NULL, subscriber text NOT NULL, CONSTRAINT subscribers_pk PRIMARY KEY (host_account, subscriber), CONSTRAINT host_account_fk FOREIGN KEY (host_account) REFERENCES users (email) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE

WITH ( OIDS=FALSE

ALTER TABLE subscribers admin_test COMMENT ON TABLE subscribers IS 'Table for managing subscribers for channels';

and ı get this error:

admin

Fenrirthviti commented 7 years ago

You're missing a lot of () and ; from the original command if that's exactly what you're putting in. Syntax is very important, you can't remove the command characters.

Fenrirthviti commented 7 years ago

Closing as this is an install issue and not a problem with the site itself.